Why many programmers don't like GC?

aberba karabutaworld at gmail.com
Mon Jan 18 12:17:24 UTC 2021


On Monday, 18 January 2021 at 11:55:46 UTC, Ola Fosheim Grøstad 
wrote:
> On Monday, 18 January 2021 at 11:43:20 UTC, aberba wrote:
>> Nevertheless, GC in D isn't going anywhere. And if the 
>> approach for writing nogc code in D doesn't cut it, then I'm 
>> not what else will.
>
> As long as that attitude prevails, D will be going nowhere as 
> well.

I meant it as this. English is not my native language so pardon 
my phrasing if it doesn't sound right.


I'm not aware of an alternative way of writing D code aside what 
already comes with it by default.

If you read the Origin of D book, you would see that the GC was a 
desire thing when D was designed probably due to how useful it is 
for ... as said, 90% or so of software development. So at this 
point, fighting the GC isn't (in my opinion) the right strategy.

I should also say that I notice your point about improving GC in 
D and making it more optional as much as possible for things that 
still rely on GC...ARC, etc. 👍


The OP was about why programmers don't "like" GC. I've been here 
long enough to see the GC being one of the most re-occurring 
issues for discussion (probably due to new users coming in). 
There's been official posts about how D's style of GC isn't like 
that of fully managed languages, how to write nogc code in D, how 
to minimize GC, among others.

Now if none of these work for you (for some special reason), then 
the long-term strategy might be an alternative runtime and or 
std. Which isn't a good answer that thought was worth it...so I 
didn't include that.

If none of these work, then I (as in my personal opinion), don't 
know what else is available.






More information about the Digitalmars-d-learn mailing list