Enhancing foreach

ixid nuaccount at gmail.com
Wed Jan 9 09:07:49 PST 2013


> Just like the terser iota, it's more elegant and easier for 
> newer users. The fewer symbols there are in code the easier it 
> is to parse for the user (up to a point). It's also more 
> consistent with iota. It also means that a foreach that 
> iterates a function return value can be written in the same 
> manner whether it returns an array or an integer, again more 
> consistency.

It would be even nicer to be able to write for(i;5) and have it 
behave as foreach.


More information about the Digitalmars-d-learn mailing list