"for" statement issue
Vladimir Panteleev via Digitalmars-d
digitalmars-d at puremagic.com
Fri Oct 21 09:39:06 PDT 2016
On Friday, 21 October 2016 at 12:34:58 UTC, Andrei Alexandrescu
wrote:
> What would be a good solution to forbid certain constructs in
> the increment part of a for statement?
For this specific case, a clear solution would be to forbid
evaluating lambdas as a boolean expression, because they will
always be true, and thus almost always an error. Same as with
assignments in if statements. If intended, it can be worked
around with "!is null".
More information about the Digitalmars-d
mailing list