DIP60: @nogc attribute

Steven Schveighoffer via Digitalmars-d digitalmars-d at puremagic.com
Mon Apr 21 10:57:09 PDT 2014


On Mon, 21 Apr 2014 13:28:24 -0400, Walter Bright  
<newshound2 at digitalmars.com> wrote:

> On 4/21/2014 5:00 AM, Steven Schveighoffer wrote:
>>> Total replacement of GC with ARC in D will:
>> This is the wrong straw-man, I'm not advocating for this at all.
>
> Many are when they advocate ARC for D.

Does that preclude you from accepting any kind of ARC for D?

> 5. Numerous posters here have posited that the overhead of ARC can be  
> eliminated with a sufficiently smart compiler (which does not exist).

You continue to speak in extremes. People are saying that the compiler can  
eliminate most of the needless ARC increments and decrements, not all of  
them. Compilers that do this do exist.

>> Note that shared_ptr would never be able to handle D's slice appending  
>> either.
>
> I know. shared_ptr would, of course, be used at the specific discretion  
> of the programmer. It would not be under the hood, and it would not be  
> memory safe.

Doesn't RefCounted do this already?

-Steve


More information about the Digitalmars-d mailing list