Tango vs Phobos
Simen Kjaeraas
simen.kjaras at gmail.com
Tue Aug 12 15:19:14 PDT 2008
bearophile <bearophileHUGS at lycos.com> wrote:
> Examples of other possible improvements:
> foreach (i, x in array)
> instead of:
> foreach (i, x; array)
> (But people here have explained me that despite this being better for
> the programmer it's worse for the compiler, making it more complex etc,
> and in the end a worse compiler is bad for the programmer too).
Why not make it
foreach (i, x of ar)
? Oh right. Because that would add keywords to the language.
Other ideas (that do not add keywords):
foreach (i, x with ar)
foreach (i, x for ar)
foreach (i, x scope ar)
and of course, there's my favorite:
foreach (i, x enum ar)
--
Simen
More information about the Digitalmars-d
mailing list