Garbage Collection for Systems Programmers

Adam Wilson flyboynw at gmail.com
Sat Apr 6 00:06:04 UTC 2024


On Friday, 5 April 2024 at 16:40:06 UTC, Carl Sturtivant wrote:
> *There is a massive strategic win to having a fabulous 21st 
> century GC for D, perfectly good for soft-real-time coding with 
> no further ado, like the one used by the author of the article 
> linked at the start of this thread.*

This is the point I was trying to make. The strategic win for 
have a fantastic GC would be immense, and would far outweigh 
anything we could gain by continuing down the no-GC path. But 
first I would like to state that I am *not* advocating that D 
remove any of the existing no-GC support. Even I use it 
occasionally!

But I was there when the anti-GC crowd put on a full court press 
to convince the community that all we needed to do to see massive 
increase in adoption was make the language more accessible to 
C/C++ users who need to manually manage memory. As a result, 
tools like `@nogc` and `-betterC` were introduced. When that 
proved insufficient, the anti-GC crowd started demanding more 
invasive changes, up to and including removing the GC altogether.

Instead, the world changed around us. Memory Safety is now a 
national security concern and languages like C/C++ are being 
slowly replaced in favor of Rust/Go/C#/Java. These languages 
speak to the most common usages and concerns of the users of 
programming languages, and those usages/concerns largely do not 
benefit from no-GC.

Chasing no-GC as far as we did was a mistake that cost us 
precious time and scarce resources. We need to be mature enough 
to admit that it was a mistake and correct our course. Given the 
lessons and direction of the industry over the intervening years, 
I would strongly argue that now is the time to return our focus 
to the GC.

> Imagine this: what if D had such an ace GC for the last decade? 
> Perception and use of D would be entirely different to its 
> present state; soft-real-time applications would abound, with a 
> wide community of pro-D game programmers talking in the forums.
>
> Just like ImportC being a game changer, ace GC is a game(!) 
> changer. It's just harder to see this, but it is so.

Mic. Drop.


More information about the Digitalmars-d mailing list