DMD now has colorized syntax highlighting in error messages

Ali Çehreli via Digitalmars-d-announce digitalmars-d-announce at puremagic.com
Tue May 16 01:07:59 PDT 2017


On 05/14/2017 07:07 AM, Walter Bright wrote:
> https://github.com/dlang/dmd/pull/6777
>
> It turned out to be unexpectedly easy to implement.
>
> The only downside is now we have to rather tediously tweak the error
> message texts so they use backticks.

Color is informative to humans, so I'm all for it. I agree with others 
that it may be hard to please everyone. Is it possible to use the 
default scheme of the terminal?

I had the good fortune of sitting with Chandler Carruth and other C++ 
people during dinner here at C++Now. We did talk about error reporting 
and although it's mostly agreed that clang's errors are a big 
improvement, Chandler said that no matter how short or informative, 
people still don't read error messages! I'm not surprised: people are 
people. (I'm one and proud of it. :) )

According to Chandler, Rust got this right: Apparently, Rust shows the 
code *first*, then the error message underneath it. Chandler said that 
this trivial change in error reporting has been transformative and now 
people are very happy with Rust's error messages.

Ali



More information about the Digitalmars-d-announce mailing list