On Friday, 6 October 2017 at 21:12:58 UTC, Rion wrote:

I can make a few simple demos and have D use by default 5 to 10 more memory then the exact same C or C++ program. While D does not actually use it ( its only marked as allocated for the GC ), it does not dispel the notion or feeling of people that a GC = bad.

You can configure the GC to deal with that [1].


Other aspects like being unsure when the GC will trigger can also influence people to a non-gc language.

In general: The GC can only trigger when you request memory from it. W.r.t to the current GC implementation, it will trigger when it doesn't have enough memory to fulfill an allocation request. In short: You're always in control of exactly when GC pauses can occur. I recommend the GC series for further information [1].

[1] https://dlang.org/spec/garbage.html#gc_config
[2] https://dlang.org/blog/the-gc-series/

Reply via email to