Hacker News new | ask | show | jobs
by bad_user 4281 days ago
> It doesn't have a GIL

On platforms like Go and the JVM, the garbage collector acts like a GIL, which is why they'll never replace C/C++.

2 comments

Most concurrent C programs of a reasonable size eventually have some kind of big global lock. The linux kernel had one for a long time and it took a lot of effort to add more fine grained locking. Similarly most large C programs have a garbage collector of some kind.
most large C programs have a garbage collector of some kind

[citation needed] - the vast majority of Linux software is C or C++ and I can't immediately think of any with GC. It's not normally assumed, everyone does explicit deallocation, possibly ending up writing their own slab or pool allocators.

That's a good insight. Thanks!