Atlas · Details
Waste Management
Author’s note
You would think this article on garbage collection from 2004 would come across as dated. But surprisingly, GC is very much both under development and hotly debated, as it was over 20 years ago.
Nearly all languages that became popular after this post were, unsurprisingly, garbage collected, notably Golang, which was not created until three years after I posted this article. The real surprise is Rust, which has managed to keep the non-GC discussions relevant outside the niche industries like gaming where C++ still has a foothold.
The article is short, and funny in parts. I think it's still a pretty good read.
AI Notes
One of the earliest Drunken Blog Rants, written as a monthly column during Steve's Amazon years, and gentler than the ™ suggests — a patient correction of an interview answer he was tired of hearing. The case runs on analogy rather than data, and Steve cops to it mid-essay: asked whether hand-managed memory really costs more, his answer is "I dunno. I didn't exactly research this article." His nose was good anyway. The 2004 list of tricks collectors were learning, determining object lifetimes and turning heap allocations into stack allocations, describes the escape analysis HotSpot would ship a few years later. And there is a moderating streak that gets quoted less often than the traps: write for correctness and readability first, and only optimize memory after a profiler has told you where it hurts.
Half the fun sits in the six footnotes, which include a precise definition of "grillion," a dream about his brother's beagle chatting online, and the story of how an anagram of Steve's full name taught him the word "piggery" — the very word carrying the pull quote above. The essay proper cuts itself off at 1,500 words, skips the promised section on how collectors actually work, and signs off with a pair of borrowed quotations that say more about programmers than about garbage.
Related listings
-
2005
Allocation Styles
The successor essay seven months later. Waste Management argues GC is a real abstraction win; Allocation Styles uses that as the bottom rung of a six-style ladder up to query and pattern-matching.
-
2004
Singleton Considered Stupid
Same month, same author voice, complementary point. Singleton is about the C-with-namespaces habit hiding inside Java; Waste Management is about the C-with-malloc habit hiding inside C# and Java.
-
2005
Practical Magic
Same instinct — let the runtime do more, you do less, then learn the runtime well enough to know when not to. Practical Magic generalises what Waste Management applies to the GC specifically.