Nicholas Wilson

Results 299 comments of Nicholas Wilson

@mdparker this should be ready to go.

Please give an example. If what you say is what I think you mean then this shouldn't be a problem because the messages can be factored out into an enum...

~All we need do is, as we re-evaluate the constraint to print `not satisfied: ...`, if the constraint failed, reevaluate it again ungaged with speculative errors on with a flushed...

If there are multiple inviable candidates which one do you print the diagnostics for? That is a hard problem. This DIP is a large step in the direction of narrowing...

> Then presumably each constraint template will have its own error message enum paired with it. You missed the part about the message being optional. > why don't we put...

You will note that the DIP is called "Expression and Block Statement Template Constraints".

That works fine for single template constraints, its even a good idea, but it is orthogonal to this DIP even if it is made feasible by it. However, in the...

~~[OT] Hahaha, https://issues.dlang.org/show_bug.cgi?id=19203 ~~ This got fixed.

@yshui @ZombineDev Ahh, you mean like https://run.dlang.io/is/yzotl4 (will work as a `static assert` argument once https://github.com/dlang/dmd/pull/8634 goes in).

Hmm actually it might be better to do something like ```D template isInputRange(T) { @("is(typeof(R.init) == R)") enum canInit = is(typeof(R.init) == R); @("is(ReturnType!((R r) => r.empty) == bool") enum...