Tasks, actors and garbage collection

evilrat evilrat666 at gmail.com
Tue Apr 27 13:29:43 UTC 2021


On Tuesday, 27 April 2021 at 12:01:33 UTC, russhy wrote:
> And at least with Unreal, since it is using C++, you are not 
> forced to stick with the GC all the time
>
> With unity, they had to come up with a special language to 
> workaround the GC/JIT issues, and if you stick to regular C#, 
> you are forced to stick with the GC no matter what

They don't. HPC# is a subset of C# without objects (no 
references).

>
> So yes i want D to be as pragmatic as C++
>
>
> You guys want D to be as closed minded as C#, we all know where 
> that leads
>

If it leads to be #1 platform for cross platform development that 
I'd call it success.


Oof. People who make games with Java can has malloc buffers via C 
bridge(libgdx if you want example), C# can even call C almost 
directly, that also opens the door to malloc and other 
allocators, moreover it is even has pointers right in the 
language (in unsafe code).

And just to be clear, object pools is the GC managed memory, this 
is simply an optimization technique and not GC avoidance, the 
memory is still under GC control, it's still will be collected by 
GC at some point, it is just delayed to some moment in time in 
future.

I don't get it, in D you have basically SINGLE scenario when GC 
actually runs - memory allocation using GC.
It just sits there, takes up just a bit of memory, but it doesn't 
waste your precious CPU ticks, it doesn't sucks power.
And the most important thing - you are free to manage the memory 
what ever way you want!
D even gives you the tools(-vgc flag) to know where exactly GC 
allocation can happen so you could optimize away that so much 
hated GC to zero.
All this available right now without changing the language and 
waiting for implementation.
So what's the problem with you?


More information about the Digitalmars-d mailing list