6 ms·
> Saying reference counting is an approach that garbage collection can use is certainly valid, but is not the same as saying that reference counting is a form o
by pcwalton 9y ago
> Saying reference counting is an approach that garbage collection can use is certainly valid, but is not the same as saying that reference counting is a form of garbage collection, which is nonsensical usage IMO.
You're drawing distinctions in the paper that the author almost certainly did not intend. "An approach to garbage collection" means "a form of garbage collection". If Bacon had meant to write "an approach that garbage collection can use", he would have written that.
David Bacon's opinion is that RC systems should have some mechanism to collect cycles. This is understandable, given that he did more work than anyone else to develop good cycle collectors (and his work in this area is a good read). But nobody in the GC field, including him, would claim that reference counting without cycle detection isn't garbage collection at all.
All garbage collection (automatic memory management) systems use a form of approximation to determine which objects are reachable. Some approximations involve reachability; that is what tracing GCs use. Some approximations involve tracking the number of outstanding references; that is what reference counting GCs use. A pure GC has a more fine-grained approximation than a pure reference counting one does. But both are approximations to the real problem: whether some data will dynamically be accessed by the program again. Reference counting has a less precise approximation, but that doesn't make it not a form of garbage collection.
Required reading:
- http://www.memorymanagement.org/glossary/g.html#term-garbage-collection http://www.memorymanagement.org/glossary/g.html#term-garbage...
- http://www.memorymanagement.org/glossary/r.html#term-reference-counting http://www.memorymanagement.org/glossary/r.html#term-referen...
- zZorgz 9y agoBy saying "reference counting is a form of GC", I'm not sure whether or not you think that reference counting has usage outside of (and could have predated) GC. David did not write "a form of" either, although you think the meaning conveyed is the same. Also one could also counter similarly with saying that if David meant should, he would have said so, but whatever. I realize memorymanagement.org conflicts with my usage, although I'm not sure I subscribe with the idea that the usage people have been using first historically is sensible.
- deleted 9y ago[deleted]