Why many programmers don't like GC?

Ola Fosheim Grøstad ola.fosheim.grostad at gmail.com
Fri Jan 15 21:21:24 UTC 2021


On Friday, 15 January 2021 at 21:15:29 UTC, aberba wrote:
> Isn't it more theoretical/imaginary/hypothetical than something 
> really measured from a real-world use case? Almost all large 
> software use cases I've seen used mix and match.

No?! Chrome has a garbage collector because JavaScript acquire 
resources in a somewhat chaotic manner, but they have fine tuned 
it and only call it when the call stack is short.

High quality game engines have similarly fine tuned collection, 
and not really a big sweeping conservative scan that lock down 
threads.

> (BTW ARC is also another form of GC)

By GC in this thread we speak of tracing GC. Generally, in 
informal contexts GC always means tracing GC, even among 
academics.

> Legends have it that almost every major software project in ANY 
> system language ends up writing custom allocators and 
> containers.

Containers certainly, allocators, sometimes. But that is not 
necessarily related to handling ownership. You can write your own 
allocator and still rely on a standard ownership mechanism.






More information about the Digitalmars-d-learn mailing list