static foreach (Was: Re: static switch)

Orvid King blah38621 at gmail.com
Fri Mar 7 06:40:58 PST 2014


On 3/7/14, bearophile <bearophileHUGS at lycos.com> wrote:
> Orvid King:
>
>> Why would we want to not unpack type tuples in a foreach?
>
> An answer:
> https://github.com/D-Programming-Language/phobos/pull/1866#issuecomment-33160357
>
> Bye,
> bearophile
>

Ah, that's what I was missing, I wasn't considering the case of
multiple iterator variables, nor, now that I really think about it,
was I actually thinking about tuple unpacking, because the unpacking
that I was talking about would be done anyways. With that in mind, I
would agree that it is an anti-feature due to the fact it adds an
arbitrary ambiguity to the language.


More information about the Digitalmars-d mailing list