D array expansion and non-deterministic re-allocation
Andrei Alexandrescu
SeeWebsiteForEmail at erdani.org
Mon Nov 16 01:09:26 PST 2009
Ali Cehreli wrote:
> Bartosz Milewski Wrote:
>
>> I read Andrei's chapter on arrays and there's one thing that concerns me.
>
> I tried to voice the same concern earlier, but my voice is not loud yet. ;)
>
>> When a slice is extended, the decision to re-allocate, and therefore to cut
>> its connection to other slices, is non-deterministic.
>
> I don't see it being any different than C++'s std::vector invalidating iterators when the vector is expanded. That has the same "non-determinism", but we've been living with it.
It is different because invalid STL iterators could do anything.
Andrei
More information about the Digitalmars-d
mailing list