The D standard library is built on GC, is that a negative or positive?

Guillaume Piolat first.last at spam.org
Wed Dec 14 16:18:01 UTC 2022


On Tuesday, 13 December 2022 at 07:11:34 UTC, thebluepandabear 
wrote:
> Hello,
>
> I was speaking to one of my friends on D language and he spoke 
> about how he doesn't like D language due to the fact that its 
> standard library is built on top of GC (garbage collection).
>
> He said that if he doesn't want to implement GC he misses out 
> on the standard library, which for him is a big disadvantage.
>
> Does this claim have merit? I am not far enough into learning 
> D, so I haven't touched GC stuff yet, but I am curious what the 
> D community has to say about this issue.

It's more of a small ecosystem divide, that a hindrance (you can 
always do more restricted code).

The GC by itself can have a cost arbitrarily low, so it's not the 
problem.

What is a problem is secret use of the druntime when you wanted 
no druntime things going on, often for compatibility reasons. 
Say, WebASM or consoles. But if you have reasons to avoid the D 
runtime, or reasons to make a minimal D runtime, you should be 
expected nto to be able to use the stdlib! Else, why would the 
runtime be for?


More information about the Digitalmars-d mailing list