Error message improvement ideas

Adam D. Ruppe via Digitalmars-d digitalmars-d at puremagic.com
Sun Dec 20 05:34:17 PST 2015


On Sunday, 20 December 2015 at 11:59:05 UTC, NX wrote:
> We should seriously find a way to make them error friendly.

I think this change I'm looking at here would make a huge 
difference because then you'd be able to see how close you got to 
matching the various overloads. (in my other post, I showed 
traditional overloading but I can apply the same technique to 
failing/passing expressions in template constraints too).

I also want to add some whitespace to the no template matches 
error, as well as the ddoc generator.

> But I'm sure core d devs will strike with a "we can't change 
> semantics, it would break existing code" argument...

The beauty of error message improvement is it doesn't break any 
code... and since it isn't on the main compilation path, the 
error generation code can afford to be less than perfectly 
efficient. Who cares if the error took an extra half second to 
generate when it cuts off five minutes of dev time and doesn't 
affect the build time when it isn't triggered?


More information about the Digitalmars-d mailing list