An exegesis of Walter's reference counted slice
via Digitalmars-d
digitalmars-d at puremagic.com
Tue Feb 24 13:55:32 PST 2015
On Tuesday, 24 February 2015 at 19:40:35 UTC, Andrei Alexandrescu
wrote:
> So: does DIP25 allow safe slices? Looks that way
I believe it does, but at the cost of forced reference counting.
As I pointed out, the `ref` solution is not applicable to slices,
therefore it needs to return an RCArray. This in turn forces an
inc/dec whenever it is sliced or copied, and - maybe worse - it
requires all consumers to support RCArray (or whatever other
idiosyncratic RC implementation users come up with).
More information about the Digitalmars-d
mailing list