Numbering compiler error messages?

Brad Anderson eco at gnuk.net
Fri Mar 28 13:32:12 PDT 2014


On Friday, 28 March 2014 at 18:28:17 UTC, Walter Bright wrote:
> On 3/28/2014 10:28 AM, Brad Anderson wrote:
>> I'm a big fan of CXXXX and LNKXXXX from Visual C++ personally 
>> but have never
>> brought it up because I know Walter doesn't care for them. The 
>> quality of error
>> messages in D is a weakness in my opinion though so anything 
>> to help with that
>> is good in my book.
>
> The quality of error messages is always a problem, but numbers 
> won't fix that. (Been there, done that, too. Numbering doesn't 
> clarify things.)

I think we'll just have to agree to disagree on that point. I've 
found VC++ error numbers invaluable whenever I confront a 
confusing error. There are often examples of what cause the error 
and how to fix it.

> What we have been doing is, when lousy messages are identified, 
> a PR is often produced to improve it. That's how these things 
> get better, one message at a time.

Yeah, that is true (even if error numbers were adopted).

The error message I've always hated the most is "does not match 
any function template declaration" but error numbers wouldn't 
help with that one because the error is obvious but what exactly 
caused it isn't. I kind of wrote out an idea for one way it could 
be improved awhile back (basically just reformatting the message 
so you can point an arrow at the failing template constraint).

http://forum.dlang.org/thread/mailman.240.1389276481.15871.digitalmars-d@puremagic.com?page=4#post-vpglmlxqhiipeyrjfwzx:40forum.dlang.org

It's dated though because CyberShadow has since added column 
numbers and using that would be prefered, I think. Just 
underlining failing template constraint would do wonders. 
Combined with colored output and deciphering this error message 
would be almost pleasant.


More information about the Digitalmars-d mailing list