Escaping the Tyranny of the GC: std.rcstring, first blood

Andrei Alexandrescu via Digitalmars-d digitalmars-d at puremagic.com
Mon Sep 15 07:53:47 PDT 2014


On 9/15/14, 6:13 AM, Jakob Ovrum wrote:
> One method would be to support shared(RCString). This isn't very
> practical for this use-case, as since atomic reference counting is super
> slow, you wouldn't want to be using shared(RCString) throughout your
> program. So you'd have to make a copy on each side (unshared -> shared,
> then send, then shared -> unshared) which is one copy more than
> necessary and would still require support for shared(RCString) which is
> non-trivial.

I think shared(RCString) should be supported. Unique!T is, of course, 
also worth exploring. -- Andrei


More information about the Digitalmars-d mailing list