Garbage Collection
Great article, but I'm curious why automatic reference counting (ARC) and smart pointers never seemed to really catch on outside of Objective-C and Swift:<p><a href="https://en.wikipedia.org/wiki/Automatic_Reference_Counting" rel="nofollow">https://en.wikipedia.org/wiki/Automatic_Reference_Counting</a><p><a href="https://en.wikipedia.org/wiki/Smart_pointer" rel="nofollow">https://en.wikipedia.org/wiki/Smart_pointer</a><p>They almost "just work", except for circular references:<p><a href="https://en.wikipedia.org/wiki/Reference_count#Dealing_with_reference_cycles" rel="nofollow">https://en.wikipedia.org/wiki/Reference_count#Dealing_with_r...</a><p>I'd like to see some real-world studies on what percentage of unclaimed memory is taken up by orphaned circular references, because my gut feeling is that it's below 10%. So that really makes me question why so much work has gone into various garbage collection schemes, nearly all of which suffer from performance problems (or can't be made realtime due to nondetermistic collection costs).<p>Also I can't prove it, but I think a major source of pain in garbage collection is mutability, which is exacerbated by our fascination with object-oriented programming. I'd like to see a solid comparison of garbage collection overhead between functional and imperative languages.<p>I feel like if we put the storage overage of the reference count aside (which becomes less relevant as time goes on), then there should be some mathematical proof for how small the time cost can get with a tracing garbage collector or the cycle collection algorithm of Bacon and Paz.