1 comment

[ 3.0 ms ] story [ 12.6 ms ] thread
On the theme Even Better Error Messages, it would be nicer if the executable detected whether the output buffer is a terminal supporting color and use color by default. The user could decide via flag if they want the various underline styles, color, both, or neither.

The error message highlighting is one of the few things I appreciate about Rust.

The dream for me? If Rust, Python, C++ compilers could prioritize errors and then show only the most important n errors "plus 749 less important errors (E0412 x 503, E0425 x 110, E0599 x 93, and 43 various other errors)" (I've read that normally the top errors are most relevant, but I don't have enough experience to confirm.)

I just compiled a demo resulting in thousands of errors---mostly "not found in scope". Forget about whatever was in the terminal buffer before! And tools like grep, head, sort+uniq only give 10--20 percent of the necessary info. If the root cause is a missing declaration causing 500 type errors, I want to know about the declaration above all else! (g++/gcc usually gets this right, cargo not so much...)

Python also wins here, because you often get one error and the traceback, so you rarely experience the stdout vomit that a compiler for other languages can sometimes provide.