Now that's a DIP that could use some love

Andrei Alexandrescu SeeWebsiteForEmail at
Thu Sep 17 19:34:49 UTC 2020

On 9/17/20 3:16 PM, Jonathan M Davis wrote:
> Honestly, IMHO, that makes the code far worse. You're just repeating the
> constraints in plain English, which requires more than double the code for
> each constraint and doesn't really make the error messages much easier to
> understand IMHO - especially when the constraints are already using traits
> that make what they're doing clear.

This has got to be the ultimate in reverse psychology. Picture this: I 
set out to save Walter some work. I took what seemed a motherhood and 
apple pie argument - I mean, who in the world would argue against better 
error messages? Yes, in Queen's English! It turns out, those can be found.

Now imagine I wrote this instead:

How about we do some DIP cleanup? All those dead and moribund DIPs 
laying around. I suggest we start with - it really does nothing else but 
repeat the constraints in natural language. There's also been 
improvements in how the compiler displays errors. I propose we just chop 
that DIP.

More information about the Digitalmars-d mailing list