On Wednesday, 30 April 2014 at 23:34:33 UTC, Andrei Alexandrescu
wrote:
On 4/30/14, 4:19 PM, froglegs wrote:
Here is an alternative:
1. classes are unique by default, they cannot be shared. No
GC or RF
required, and covers 90% of objects.
Where does 90% come from? On the contrary, it seems to me
unique references are rather rare and fleeting. -- Andrei
Yeah, 90% doesn't feel right to me. In C++ I try to use
unique_ptr instead of shared_ptr wherever possible but I find I'm
often not able to because my references need to be held in
several places for efficiency. I'd say I'm more like 90%
reference counted, 10% unique throughout my 300kloc codebase.