foreach

Steven Schveighoffer via Digitalmars-d digitalmars-d at puremagic.com
Thu Jun 12 13:06:02 PDT 2014


On Thu, 12 Jun 2014 15:26:31 -0400, Nick Sabalausky  
<SeeWebsiteToContactMe at semitwist.com> wrote:

> On 6/12/2014 3:10 PM, Steven Schveighoffer wrote:
>>
>> Sorry, saving 1-2 characters typing is really minor. This does not, in
>> my opinion of course, have any significant improvement on usability for
>> D. It simply does not carry it's own weight, and the potential to create
>> bugs in the foreach handling would be not worth the risk.
>>
>
> While I agree on its triviality, I really doubt there's much "weight" to  
> speak of either. Hara probably could've already implemented and tested  
> this in the same amount of time any *one* of us have already spent  
> bikeshedding it.
>

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


More information about the Digitalmars-d mailing list