D is our last hope

Martyn martyn.developer at googlemail.com
Tue Dec 12 14:10:18 UTC 2023


On Tuesday, 12 December 2023 at 12:40:15 UTC, DrDread wrote:
> On Tuesday, 12 December 2023 at 11:05:30 UTC, Martyn wrote:
>> Game programmers NEED CONTROL OF MEMORY.
>
> while this is true, it's not true for the whole application. 
> there's a lot of things in games that _do_ benefit from having 
> a GC (or any other form of automatic memory management).
>
> what you don't do is use the GC to track particles or game 
> entities. but you can easily use it to allocate the arrays in 
> which you manually manage those.

I have (tried to) address this in previous comments. I am not 
100% against GC. I am just making a point that for high-level 
games, you need to be careful when using it (if you really need 
it at all.. and I wouldn't!)

Some game programmers make it clear they dont want to use it at 
all.

All this discussion on games, OOP, and GC all started just 
because I replied about using Java in the late-90's and how much 
I hated it. LOL.



More information about the Digitalmars-d mailing list