4 ms·
Ownership / affine types? It's hard to say, because some folks will jump up and down and say "reference counting is GC!", and then some folks could just as jus
by frankmcsherry 9y ago
Ownership / affine types?
It's hard to say, because some folks will jump up and down and say "reference counting is GC!", and then some folks could just as justifiably say "regions are GC!"
- sitkack 9y agoAnything less than being able to track memory lifetime at compilation is GC. Some folks will jump up and down and say "variable sized allocation is sloppy!" GC is a spectrum on which reference counting lives. Is there an arch that supports bidirectional references?
- snaky 9y agoMaybe linear types actually, affine is not enough?
- frankmcsherry 9y agoI suspect affine is fine, but I'm not an authority. The distinction (as I understand it) is only that linear types require that you consume all instances, whereas affine allow you to leak if you want. Leaking doesn't seem to lead to dangling pointers, but I've been wrong before.