DIP60: @nogc attribute

Walter Bright via Digitalmars-d digitalmars-d at puremagic.com
Mon Apr 21 10:28:24 PDT 2014


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.


>> 4. Will not be memory safe (see (2))
>> 5. Require the invention of optimization technology that doesn't exist
>
> Besides being a tautology, what does this mean?

4. There is no language protection against misusing ARC, hence it cannot be 
mechanically verified to be memory safe.
5. Numerous posters here have posited that the overhead of ARC can be eliminated 
with a sufficiently smart compiler (which does not 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.



More information about the Digitalmars-d mailing list