On 2/22/15 10:26 AM, deadalnix wrote:
On Sunday, 22 February 2015 at 17:01:45 UTC, Andrei Alexandrescu wrote:
Consider

class C { ... client code ... }
alias T = RefCounted!C;
... more client code ...

For reference counting to work transparently, access to the symbol "C"
must be restricted. RefCounted obviously needs access to it. Client
code should never have access to it, even in the definition of C.


What ??? That mean writing all library code twice, for client that want
GC and for these who don't.

I'm not 100% convinced but it seems to me RC vs. GC is a class design time decision.

That is a looser strategy.

I'm sure there are tighter ones :o).


Andrei

Reply via email to