foreach

Steven Schveighoffer via Digitalmars-d digitalmars-d at puremagic.com
Thu Jun 12 16:17:56 PDT 2014


On Thu, 12 Jun 2014 17:41:36 -0400, Timon Gehr <timon.gehr at gmx.ch> wrote:

> On 06/12/2014 10:06 PM, Steven Schveighoffer wrote:
>>>
>>
>> I don't think it's as trivial as you imply. You have to use a symbol
>> that's valid, but isn't used in the subsequent loop to avoid collisions.
>>
>> -Steve
>
> Why would implicit local variables need unique names? This can be  
> implemented by preventing identifiers named '_' to be inserted into the  
> symbol table.

Of course, it doesn't HAVE to be that way. I would think it would be  
easier to implement. I don't know enough to judge which is easiest, but it  
doesn't sound trivial either way.

-Steve


More information about the Digitalmars-d mailing list