std.collection - changing the collection while iterating

Steven Schveighoffer via Digitalmars-d digitalmars-d at puremagic.com
Mon Jun 22 06:37:19 PDT 2015


On 6/22/15 2:29 AM, Andrei Alexandrescu wrote:
> On 6/21/15 10:03 PM, Steven Schveighoffer wrote:
>> An iterator remains valid as long as its target hasn't been removed.
>
> The matter is very well understood. My point here is that leaving it to
> the user to make sure which ranges are still valid vs. not is not
> appropriate for D's container. -- Andrei

Then std.collection will be second fiddle to C++ and dcollections I'm 
afraid when it comes to usability.

I won't be using such containers, and will continue to stick with a 
design that lacks training wheels.

-Steve


More information about the Digitalmars-d mailing list