The D standard library is built on GC, is that a negative or positive?

matheus matheus at gmail.com
Wed Dec 14 10:06:40 UTC 2022


On Wednesday, 14 December 2022 at 08:01:47 UTC, cc wrote:
> ...
> I disagree with the majority opinion on this subject.  I find 
> D's GC to often be heavily oversold, when it is particularly 
> not applicable to many portions of my use case (game 
> development)...
> ...

I use to write games (Personal Projects), and my main language 
believe or not is still the old C for most of the time, I already 
have my lib and my way of doing it so, no big deal for me!

But when I tried D for this same thing, I used to do the basic 
thing like, enable GC load and instantiate everything for the 
level, disable GC and run the game, and just enable again after 
the level is over, and I don't remember having much trouble.

For example missiles/projectiles will be added to a pre-allocated 
space as they are being fired, but what I see sometimes (In 
others people code) is they are allocating these things in 
real-time, which I don't like it.

I don't know if this is the problem some people have with GC, 
allocating in real-time, but I'd avoid it, unless game 
development changed a lot and people like to do allocation in 
real time (By the way I'm not say you're doing this).

Matheus.


More information about the Digitalmars-d mailing list