Better error messages - from reddit

Nicholas Wilson iamthewilsonator at hotmail.com
Fri Mar 8 05:46:01 UTC 2019


On Thursday, 7 March 2019 at 22:09:29 UTC, Johannes Pfau wrote:
> The DIP seems kind of intrusive to me. And Parsing a DNF

The DIP formalises a constraint in a _CNF_, not DNF.

> form has one major drawback: For quite some time now we 
> actually advised people to refactor their constraints into 
> external helper functions, in order to have nicer ddoc. E.g. 
> isDigest!X instead of isOutputRange!X && ...

Yes, but this is for a single concept for a single parameter. 
Real constraints deal with multiple parameters and conjunctions 
and disjunction of concepts, hence the CNF formalisation. The 
rest of what you describe is great, but completely orthogonal.

I have made this comment before: 
https://github.com/dlang/DIPs/pull/131#issuecomment-416555780

> So now, we'd have to recommend the exact opposite.

This follows only for a single parameter.



More information about the Digitalmars-d mailing list