Quality of errors in DMD

Ethan Watson via Digitalmars-d digitalmars-d at puremagic.com
Fri Sep 2 14:25:38 PDT 2016


On Friday, 2 September 2016 at 21:16:02 UTC, Walter Bright wrote:
> assert()s are there to check that impossible situations in the 
> compiler don't actually happen. They are not for diagnosing 
> errors in user code.
>
> If a user sees an assert, it is a compiler bug and hopefully 
> he'll submit a bug report for it in bugzilla. There aren't many 
> open assert bugs in bugzilla because we usually put a priority 
> on fixing them.

You know, I'd love to submit a bug about it. But after actually 
working out the problem without the compiler's help, I can't get 
a minimal enough test case to submit a bug with. I'll try it with 
Dustmite. But in this case, there's debug code there to spit out 
the information it has. And probably a stack to give it context.

This is legitimately the kind of stuff that drives an average 
user away from a language. I knew that commenting out one 
template invocation fixed my code, but not how to fix my template 
without a bunch of pain-staking removal and experimentation. Call 
it what you want, but that's a bad user experience.


More information about the Digitalmars-d mailing list