top | item 46755604

(no title)

bruce343434 | 1 month ago

This is why compilers for e.g. c++ should just halt after the first error, instead of spewing pages of template failures because of a typo elsewhere

discuss

order

kyralis|1 month ago

They used to, but I wouldn't want to go back to that. Believe me, compilers that continue and try their best are a massive improvement in many cases, allowing you to fix more issues between compilation attempts.

somat|1 month ago

Perhaps, I don't really program much c/c++. but in my experience most of the subsequent errors are due to the first error. So even where there might be several places I could fix the code my standard operating practice is to find the first error, fix that and see what it cleans up.

But like I said, I am not much of a C programmer. The compiler authors feel strongly about pushing past all possible errors and keep doing it so perhaps there is merit to this practice. but it bugs the heck out of me.

StellarScience|1 month ago

98% of the time those lengthy messages are useless, but the other 2% of the time they're critical to tracking down the problem.

A year or two ago Visual Studio added a pop-up that parses such lengthy compiler messages into a clickable tree list. I found it annoying at first, until I discovered I could dock it to the side, ignore it 98% of the time, but still go look at the details when relevant. This is an idea other compilers should copy.

Maybe ships should copy this approach too: issue fewer warnings, but provide a list of warning details for review when necessary.