[Dlang-study] [lifetime] Few root decisions to take on RC classes

Andrei Alexandrescu andrei at erdani.com
Fri Oct 30 14:31:56 PDT 2015


A few matters Walter and I just discussed and wanted to submit for scrutiny:

* @rc classes shall not be single-rooted. Rationale: there is no strong 
advantage in it and it would force all @rc classes to embed a vptr. This 
has been already discussed and largely agreed upon in this group.

* @rc classes will not use COM's AddRef and Release automatically. 
Rationale: (a) that's what C++'s shared_ptr does and not one soul ever 
complained; (b) the calls are virtual so less efficient and fusion is 
not possible; (c) it's a lot extra work for one platform.

* Undecided about integrating automatically with Objective-C's 
refcounts. I'm hoping more details from platform experts.

I'd like to get a DIP draft started by someone else but Walter or 
myself. Looking for a rigorous person who knows PL well and can manage 
this complex document and be its ombudsman. I'm proposing Timon for this 
role - would you want to?


Andrei


More information about the Dlang-study mailing list