Now that's a DIP that could use some love
Paul Backus
snarwin at gmail.com
Thu Sep 17 20:46:07 UTC 2020
On Thursday, 17 September 2020 at 19:58:45 UTC, H. S. Teoh wrote:
> Instead of this half-baked hack of essentially writing comments
> that repeat what the code already says, what we should be doing
> is to take the current error messages one step further: when
> some clause in a sig constraint fails, how about the compiler
> ungags the errors that cropped up while evaluating that clause?
> Instead of blindly ungagging *everything*
> (*cough*-verrors=spec*cough*), which results in a deluge of
> irrelevant errors that the one relevant message gets lost in,
> ungag only the most likely relevant errors: the ones produced
> when evaluating a failed sig constraint clause.
+1
The compiler is literally *already doing* all of the necessary
work to determine why a given constraint failed. We just need it
to *show* us that information in a way that's actually usable.
More information about the Digitalmars-d
mailing list