On 3/6/14, bearophile <[email protected]> wrote: > Timon Gehr: > >> foreach and static foreach should behave the same in all shared >> aspects. (Unfortunately, this statement is somewhat messy to >> formalize.) > > I am for deprecating unpacking of TypeTuples in foreach. > Introducing such unpacking in static foreach just to deprecate it > (hopefully a little) later is not wise. > > Bye, > bearophile >
Why would we want to not unpack type tuples in a foreach? What would we be iterating over then? Unless of course the current behavior (assuming there is no comma operator :P) of `foreach (T; (ubyte, (ushort, short), uint))` is to iterate over ubyte, ushort, short, and uint? If that is the case, I would be interested to know why the decision was made. If not, then the question still remains, why would you not want it to iterate over ubyte, (ushort, short), uint?
