DIP60: @nogc attribute

Walter Bright via Digitalmars-d digitalmars-d at puremagic.com
Wed Apr 16 10:37:37 PDT 2014


On 4/16/2014 4:50 AM, Manu via Digitalmars-d wrote:
> I am convinced that ARC would be acceptable,

ARC has very serious problems with bloat and performance.

Every time a copy is made of a pointer, the ref count must be dealt with, 
engendering bloat and slowdown. C++ deals with this by providing all kinds of 
ways to bypass doing this, but the trouble is such is totally unsafe.

Further problems with ARC are inability to mix ARC references with non-ARC 
references, seriously hampering generic code.

> and I've never heard anyone suggest
> any proposal/fantasy/imaginary GC implementation that would be acceptable...

Exactly.


> In complete absence of a path towards an acceptable GC implementation, I'd
> prefer to see people that know what they're talking about explore how
> refcounting could be used instead.
> GC backed ARC sounds like it would acceptably automate the circular reference
> catching that people fuss about, while still providing a workable solution for
> embedded/realtime users; disable(/don't link) the backing GC, make sure you mark
> weak references properly.

I have, and I've worked with a couple others here on it, and have completely 
failed at coming up with a workable, safe, non-bloated, performant way of doing 
pervasive ARC.



More information about the Digitalmars-d mailing list