DIP 57: static foreach
Shammah Chancellor via Digitalmars-d
digitalmars-d at puremagic.com
Tue Nov 3 21:38:37 PST 2015
On Wednesday, 4 November 2015 at 00:23:59 UTC, Andrei
Alexandrescu wrote:
> On 11/3/15 3:12 PM, Shammah Chancellor wrote:
>>>
>>> So, I think that static foreach *cannot* support break and
>>> continue as
>>> same as foreach with tuples.
>>>
>>> Kenji Hara
>>
>> Ditto. This needs `static continue` and `static break`.
>> Without this
>> functionality, the control flow in `static foreach` becomes
>> very unwieldy.
>
> There's no reason technical or otherwise to require "static"
> with continue/break in static foreach. -- Andrei
I'm not sure that I agree with you. However, in the latest DMD
it appears that named break/continues work with foreach over
tuples now. So, I'll rescind my statement regarding separating
compile-time control flow vs runtime control flow.
-Shammah
More information about the Digitalmars-d
mailing list