C++ Ranges proposal for the Standard Library
monarch_dodra via Digitalmars-d
digitalmars-d at puremagic.com
Sat Oct 18 10:37:08 PDT 2014
On Saturday, 18 October 2014 at 17:31:18 UTC, Walter Bright wrote:
> I agree. It's like "foreach" in D. It's less powerful and
> foundational than a "for" loop (in fact, the compiler
> internally rewrites foreach into for), but that takes nothing
> away from how darned useful (and far less bug prone) foreach is.
Actually, there are quite a few bugs related to modifying values
and/or indexes in a foreach loop. In particular, foreach allows
"ref" iteration over ranges that don't give ref access...
More information about the Digitalmars-d
mailing list