Tasks, actors and garbage collection

russhy russhy at gmail.com
Tue Apr 27 14:59:22 UTC 2021


On Tuesday, 27 April 2021 at 13:29:43 UTC, evilrat wrote:
> 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?

libgdx also is a pain in the ass to work with because you have to 
constantly fight with java and the GC, they had to rewrite all 
the data structures (collections etc because they allocate on 
foreach)

that is why libgdx is dead, java is not suitable for gamedev

--

concerning microsoft, that is why they are working on their new 
rust like language with full C++ interop, rip D, 
https://github.com/microsoft/verona/


--

you all misread me, and you all miss the point, i'm not asking to 
make D a no-gc language only

i am asking we should aim to be a memory agnostic language, where 
one can plugin a GC transparently and do what ever he wants, and 
at the same time transition to a full manually managed scheme 
with allocators transparently

it solves issues C# peeps at unity have, and makes everyone happy


More information about the Digitalmars-d mailing list