Our Sister

Xinok via Digitalmars-d digitalmars-d at puremagic.com
Thu May 26 10:45:15 PDT 2016


On Thursday, 26 May 2016 at 16:11:22 UTC, Andrei Alexandrescu 
wrote:
> I've been working on RCStr (endearingly pronounced "Our 
> Sister"), D's up-and-coming reference counted string type. The 
> goals are:
> ...

I don't know how practical this would be, but if at all feasible, 
I think one of the goals should be to have a common 
interface/primitives with regular strings so we can write generic 
functions which accept both native strings and RCStr.

Otherwise, I second Jack's points.

> * Reference counted, shouldn't leak if all instances destroyed; 
> even if not, use the GC as a last-resort reclamation mechanism.

Could you (or somebody) elaborate a little on how this could work 
from a technical standpoint? The only way I see this working is 
if the GC always scans for RCStr-allocated memory, in which case, 
why even bother with RC?


More information about the Digitalmars-d mailing list