Do we need "foreach"?

Bill Baxter dnewsgroup at billbaxter.com
Sun Apr 27 12:35:49 PDT 2008


Just started wondering why we really need the foreach keyword.

These two

for( x ; y ; z )

for( x ; y )

do no seem to be ambiguous to me.  You do need some lookahead, but I 
think D has some constructs like that already.

If we're looking to get rid of keywords it seems like a candidate.  I 
already mistakenly type "for" when I mean "foreach" fairly often.

--bb





More information about the Digitalmars-d mailing list