I have a plan.. I really DO

H. S. Teoh hsteoh at quickfur.ath.cx
Fri Jul 6 21:15:46 UTC 2018


On Fri, Jul 06, 2018 at 08:16:36PM +0000, Ecstatic Coder via Digitalmars-d-announce wrote:
[...]
> I've never said that this is something smart to do. I'm just saying
> that this code can perfectly be executed once in a C++ game frame
> without having to worry for a game freeze, because the string buffer
> deallocation is done once per frame too.
> 
> While with many GC languages, you actually DON'T KNOW when all those
> unused string buffers will be claimed.
[...]

As I've already repeated twice, this is not true in D. You *can* predict
precisely when the GC runs a collection cycle by calling GC.disable and
then calling GC.collect according to *your* own schedule.  This is not
just a theoretical thing.  I have actually done this in my own projects,
and it does work.

Of course, for someone looking for an excuse not to use D, they will
always find another reason why this is not sufficient. But that only
strengthens the point that the GC is just a convenient excuse not to use
D. Solve that problem, and they will just move on to the next excuse,
because the GC is not the real reason; the real reason is probably
non-technical. Like good ole inertia: people are lazy and set in their
ways, and resist changing what they've grown comfortable with. But
actually admitting this would make them look bad, so it is easier to
find a convenient excuse like the GC (or whatever else is different from
the status quo).


T

-- 
Knowledge is that area of ignorance that we arrange and classify. -- Ambrose Bierce


More information about the Digitalmars-d-announce mailing list