static foreach (Was: Re: static switch)
bearophile
bearophileHUGS at lycos.com
Thu Mar 6 14:06:47 PST 2014
Timon Gehr:
> No. static foreach does not introduce a new scope.
> "TypeTuple"-foreach does. Deprecating this language feature is
> not in scope of the 'static foreach' DIP. It's separate, and
> I'd even argue for not doing it.
My most basic point in this ER is to require a "static" before
"foreach" when you loop on TypeTuples, because the current
situation is confusing for newbies and makes D code less explicit:
https://d.puremagic.com/issues/show_bug.cgi?id=4085
Introducing a third type of foreach that is intermediate between
the semantucs of the regular foreach and the already present
typetuple foreach is ridiculous, will increase the language
complexity and will make D and even more confusing for newbies.
Bye,
bearophile
More information about the Digitalmars-d
mailing list