Garbage collection is contrarian

by aapoalason 1/9/2026, 9:15 PMwith 23 comments

by kannanvijayanon 1/12/2026, 12:29 PM

Writing a GC in rust without just dropping the whole business into unsafe is really annoying.

Jason Orendorff has an implementation of a GC in rust called "cell-gc" that seemed like only one I've seen so far that seemed to "get" how to marry rust to the requirements of a GC implementation: https://github.com/jorendorff/cell-gc

Still has a lot of unsafe code and macro helpers, but it's laid out well and documented pretty well. Not sure if you've run across it yet.

by eruon 1/12/2026, 4:52 AM

Compare also 'A Unified Theory of Garbage Collection' https://web.eecs.umich.edu/~weimerw/2008-415/reading/bacon-g...

by shevy-javaon 1/12/2026, 10:18 AM

This reminds me of the old Monty Python sketch:

https://www.youtube.com/watch?v=uLlv_aZjHXc (Argument Clinic)

by antonvson 1/12/2026, 9:49 AM

Just intuitively, this seems to be using a feature designed to guarantee safety in a way that doesn’t guarantee safety, which raises questions about what the point is.

by anArbitraryOneon 1/12/2026, 11:11 AM

I clicked on this hoping is was about physical garbage collection

by _3u10on 1/12/2026, 10:01 AM

Just use unsafe then you have all of the good points of rust, like being able to say you wrote it in rust with none of the downsides, like having to write safe code in rust, or that code being slow.

by illuminator83on 1/12/2026, 12:10 PM

I'm hoping for a future in which humankind looks back with embarrassment at this silly period in its history in which people used to think a leaky and bad abstractions like garbage collection was ever a good approach to deal with resource life-times.