"Ben Davis" <[email protected]> wrote in message news:[email protected]... > > Note that this is already supported (apologies if I've got the syntax > slightly wrong): > > foreach (i, ref tile; map) { ... } > > That's a local variable too. It could have instead been defined such that > "tile" is an alias for "map[i]", but that would be a little strange. >
That's a very good point. Technically, foreach is implemented such that its body is a function and the "i, ref tile" is the parameter list. But I think that's beside the point.
