I don't like slices in D
Andrei Alexandrescu
SeeWebsiteForEmail at erdani.org
Fri Oct 18 08:28:35 PDT 2013
On 10/17/13 10:45 PM, Jesse Phillips wrote:
> I believe this
> was the behavior of D1, is not true in D2 and must not be true for
> immutable arrays such as string.
Yes, there have been repeated discussions in this group about changing
that behavior, it created pernicious long-distance dependencies (someone
would pass a slice to someone else, and they'd start trampling into the
caller's data. For a while it seemed there would be no reasonable
solution, until we finally figured the whole capacity caching thing.
Andrei
More information about the Digitalmars-d
mailing list