4 ms·
All programming languages are "duals" of each other in the Turing complete sense, though that doesn't tell you much beyond: they're programming languages. So h
by erichocean 7y ago
All programming languages are "duals" of each other in the Turing complete sense, though that doesn't tell you much beyond: they're programming languages.
So here's how reference counting and garbage collection are duals: they both manage the memory lifetimes for objects not on the stack. If that blows your mind, you also might enjoy the above referenced paper and the meme that reference counting is "GC done badly".
- afiori 7y agoI was referring specifically to the paper https://www.cs.virginia.edu/~cs415/reading/bacon-garbage.pdf https://www.cs.virginia.edu/~cs415/reading/bacon-garbage.pdf (found by pron in another comment). Where duality is in term of seeing reference counting as a form of negative-tracing. the paper also analyzes various techniques and claim that they mostly just mixes the two approaches. also if I can be facetious: > So here's how reference counting and garbage collection are duals: they both manage the memory lifetimes for objects not on the stack. that would be an equivalence, not a duality.