Garbage Collection for Systems Programmers

Adam Wilson flyboynw at gmail.com
Thu Apr 4 06:15:01 UTC 2024


On Tuesday, 2 April 2024 at 13:23:48 UTC, Guillaume Piolat wrote:
> Instead the Mir library, Dplug, Hipreme Engine and soon 
> Inochi2D are doing it simply for portability because the 
> regular druntime has insane requirements, which the C standard 
> library doesn't have. We went "@nogc" when druntime wouldn't 
> even start in some macOS in shared library form, not because 
> some kind of performance reason.
>
> If you want to use GC and be portable, then (currently in D 
> today) you have to write your own D runtime. Of which there is 
> 3 or 4 custom ones!
>
> The solution is of course to lower the requirements of druntime 
> so that it can run anywhere, be in WebASM, on the Playstation 
> Vita, on the Dreamcast, what people are doing nowadays (and may 
> need or not @nogc).

This is a very reasonable take, and I can understand how 
supporting different platforms might result in needing to abandon 
features that rely on DRT, especially given the difficultly in 
porting. And I would generally agree with DIP's and PR's that 
move us in that direction. Rikki has some ideas there.

In general though, I think it is reasonable for us to say that if 
you expect D to work fully on a new platform, that you're going 
to have to fully port DRT.

And I don't have a problem with the existing no-GC features. I 
just think that we need to deprioritize no-GC so that our 
precious few resources can be spent addressing the problems we 
have with the GC and open-up new markets for D.


More information about the Digitalmars-d mailing list