"for" statement issue

Andrei Alexandrescu via Digitalmars-d digitalmars-d at puremagic.com
Fri Oct 21 09:46:08 PDT 2016


On 10/21/2016 12:39 PM, Vladimir Panteleev wrote:
> 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.

Read the example again, the lambda is not evaluated as a bool. -- Andrei




More information about the Digitalmars-d mailing list