Garbage Collection for Systems Programmers

bachmeier no at spam.net
Thu Apr 4 14:32:58 UTC 2024


On Thursday, 4 April 2024 at 04:01:56 UTC, cc wrote:

> Seriously though, what an asinine opinion.  Excluding an entire 
> market, to satisfy your religious opinions on memory 
> management.  Nobody has stopped anyone from improving the GC.  
> By all means, please improve the GC.  I develop commercial 
> games in D, I have come to avoid the GC much of the time, and 
> I'm pretty sure I haven't spent any of the past 10 years of my 
> workload getting in your way of making the GC the best it could 
> be.  I simply haven't been using it.  Oh no, someone exposed 
> GC.free and __delete as a hacky temporary stopgap?  Gosh, that 
> 30 seconds of work sure did get in the way of a decade of 
> someone else making that thing I want better.

I think you're taking the wrong thing from this conversation. 
You're helping to make the case that the anti-GC crowd is wrong. 
For me, the problem is that the anti-GC zealots make the 
following claims:

- The GC gets in the way. It needs to be removed the way Rust 
removed theirs for performance reasons.
- D isn't suitable as a systems programming language because it 
has a GC.
- GC should be removed as the default because it leads to bad 
practice.
- All D programs have to use the GC.

These things appear on Reddit, Hacker News, etc. etc. any time D 
is discussed, and it has an effect. Convincing someone to use the 
GC might be right on paper in some cases, but in practice it 
doesn't work if the other side has a fundamentalist viewpoint 
that the GC has to be removed entirely. You can see it in the 
comments on the story: "That's a valid point, but..."

I do think we need to be realistic and realize that the anti-GC 
crowd has found its love and they've married Rust or they've 
decide that C++ is a flawed but good enough spouse. That battle 
is over. D needs to worry about folks that like C (D makes it 
realistic for them to keep writing the code they like writing) 
and folks that like GC (the story's probably not as good as it 
could be).

I'll also add that I use SafeRefCounted a lot, so I'm also 
avoiding D's GC much of the time rather than forcing the GC into 
everything I do.


More information about the Digitalmars-d mailing list