DIP 1010--Static foreach--Accepted
via Digitalmars-d-announce
digitalmars-d-announce at puremagic.com
Mon Jul 17 06:26:39 PDT 2017
On Monday, 17 July 2017 at 12:50:16 UTC, Nicholas Wilson wrote:
> On Monday, 17 July 2017 at 12:38:27 UTC, Steven Schveighoffer
> wrote:
>> On 7/16/17 1:04 PM, Andrei Alexandrescu wrote:
>>> On 7/16/17 9:10 AM, Mike Parker wrote:
>>>> Congratulations to Timon Gehr. Not only was his "Static
>>>> foreach" DIP accepted, it picked up a good deal of praise
>>>> from Walter & Andrei.
>>>
>>> Indeed. Kudos to Timon (and thanks Mike for driving the
>>> process). This is a well done DIP that many others could draw
>>> inspiration from. -- Andrei
>>
>> What is the resolution of how break statements affect static
>> foreach/foreach?
>>
>> i.e. this section:
>>
>> "As some consider this to be potentially confusing, it has
>> been suggested that break and continue directly inside static
>> foreach should instead be compiler errors and require explicit
>> labels. This DIP leaves this decision to the language authors,
>> but recommends the above semantics."
>>
>> -Steve
>
> static break & static continue anyone?
break & continue are special case gotos. What would be the
semantics of static goto? In C you can skip the initialization of
variables via goto. Would you be able to skip declarations via
static goto?
More information about the Digitalmars-d-announce
mailing list