Bottom line re GC in D

Oluca via Digitalmars-d digitalmars-d at puremagic.com
Tue Jul 8 03:25:16 PDT 2014


On Tuesday, 8 July 2014 at 10:07:18 UTC, Tobias Pankrath wrote:
> On Tuesday, 8 July 2014 at 09:57:15 UTC, Oluca wrote:
>> - No, it can't be disabled if you want to keep using 
>> "impressive
>> features" of the language.
>
> What do CTFE, mixins, Ds powerful template mechanism, immutable 
> +
> slices, sane operator overloading, opDispatch, alias this and
> UFCS, RAII + scope statements to do with the GC?
>
>> Long story short, if you prefer to manage your own god-damn
>> memory manually, D isn't the way to go. No sir, you are stuck
>> with an inefficient GC.
>> They've been improving the GC for years,
>> but it's still not good enough.
>
> How does the quality of the GC even matter if you're not going 
> to use it?

- You can't use slices. You can't make use of most of the 
Standard Library functionality.
- It matters, because you can't manually manage life-time of the 
objects. See, you have to keep a reference to a C-String that you 
send to a C function, otherwise GC will eat it up, because it 
can't know better than you, yet tries to do your job. GC will 
always stand in the way, and if you want to turn it off, as I 
stated above, D becomes a less useful language.


More information about the Digitalmars-d mailing list