Expressing range constraints in CNF form

Stefan Koch via Digitalmars-d digitalmars-d at puremagic.com
Sun Jun 11 13:23:08 PDT 2017


On Sunday, 11 June 2017 at 19:51:11 UTC, ketmar wrote:
> Walter Bright wrote:
>
>> [...]
>
> i think, that something like `__constraint(condition, 
> "message")` is ok, and it should be built-in, just like 
> `__traits()`. so compiler can collect those messages, and only 
> show 'em if the matcher is failed to find anything. yeah, 
> another hack in interpreter, but fairly small, and should solve 
> "what constraint is really failed" problem.

+1
Implementation wise this one is easiest ... I guess.


More information about the Digitalmars-d mailing list