C++ Ranges proposal for the Standard Library
Walter Bright via Digitalmars-d
digitalmars-d at puremagic.com
Sat Oct 18 11:02:25 PDT 2014
On 10/18/2014 10:37 AM, monarch_dodra wrote:
> 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...
All bugs should be reported to bugzilla.
I still argue that foreach is far less bug prone than for loops.
More information about the Digitalmars-d
mailing list