DEV Community

Discussion on: Never Trust Compiler Error Messages

Collapse
 
codemouse92 profile image
Jason C. McDonald

I wouldn't go as far as to say not to trust compiler errors and warnings. Too many coders would take that advice at face value and do terrible things (and, in fact, they do...)

A better rule is only fix the first compiler error in your list, and then recompile. Yes, it takes more time, but since compilation is basically top-down, the first syntax error is going to introduce a lot of compiler misunderstandings.

The first error, as you literally just demonstrated in your example, is almost always trustworthy.