foreach syntax

bearophile bearophileHUGS at lycos.com
Fri Jun 29 07:34:33 PDT 2012


Timon Gehr:

> foreach(x in y,data)

There is no way to avoid all possible mistakes, but it's easier 
to mistake a ";" for a ",", than mistake a "in" for a ",".

"in" is used for this purpose in Python, C#, and probably other 
languages because it's more readable than an arbitrary symbol 
like ";".

Bye,
bearophile


More information about the Digitalmars-d-learn mailing list