D on quora ...

Ecstatic Coder ecstatic.coder at gmail.com
Mon Oct 16 09:58:46 UTC 2017


On Sunday, 15 October 2017 at 20:42:36 UTC, Laeeth Isharc wrote:
> On Sunday, 15 October 2017 at 07:21:55 UTC, Ecstatic Coder 
> wrote:
>> But as a C++ developer, I can tell you that : D's GC is what 
>> prevents me to use it for my current C++ programming tasks.
>>
>> Because I can perfectly live with a GC that progressively 
>> collects bits of memory in a predefined amount of time, like 
>> in the Nim language, but not one that can pause my application 
>> for an unpredictable amount of time.
>>
>> That's just my personal case and opinion, but I don't think 
>> I'm the only C++ programmer on the planet to dislike D's GC 
>> for typical C++ development cases, which are generally those 
>> where the lack of a GC is the reason that lead to the use of 
>> C++.
>
> Out of curiosity, what is it that stops you keeping the heap 
> small and allocating memory manually for the rest?

In D I've the added complexity in trying to use the game engine 
(cocos2dx, unreal, cryengine) C++ libraries from D.

So that's not worth the effort, if I can't use D's powerful 
standard library as usual.

I don't like the idea that any hidden object allocation or string 
concatenation can trigger a GC for an undefined amount of time.

In C++ you also have plenty of objects constructors/destructors 
called everywhere in your back, but none of them will ever 
trigger a GC...






More information about the Digitalmars-d mailing list