foreach on interval index by ref increment

Jonathan M Davis jmdavisProg at gmx.com
Sat Jan 21 20:17:55 PST 2012


On Saturday, January 21, 2012 22:38:48 bearophile wrote:
> In the last days Walter and other people are closing and fixing many bugs.
> But there is one bug that Walter has closed that I am not so sure about:
> http://d.puremagic.com/issues/show_bug.cgi?id=5306
[snip]

 I don't see any issue with the current behavior with regards to

foreach(i; 0 .. 10)

If anything, I'd argue that you shouldn't be allowed to use ref with iota, 
because instead of iterating over a fixed set of values, you're just taking the 
next value that a function gives you, in which case, ref makes no sense.

- Jonathan M Davis


More information about the Digitalmars-d mailing list