Re:Go GC: Solving the Latency Problem in Go 1.5
by arcticbull on Thursday July 09, 2015 @12:32AM
(#9856154)
That's why we have the 'weak' keyword ^_^ I'm confident any algorithm you want to design for a GC world can be implemented in an ARC world, maybe with a tiny bit of tweaking. It's not that there's 'no need for GC' its just that there are many ways to solve a problem.
Re:Go GC: Solving the Latency Problem in Go 1.5
by throwa990323249 on Friday July 10, 2015 @07:08PM
(#9867531)
Your "confidence" is wrong.
Consider a graph which can have nodes added, and edges added or removed. Say you want to keep track of the part of the graph that is connected to a node.
You can't know ahead of time which references can be weak. So all must be strong and you will leak memory when a circular part of the graph becomes disconnected.
In general, garbage collection is a difficult problem that solves a lot. You can't trivially do without it. It's not just a tool of laziness.
Re:Go GC: Solving the Latency Problem in Go 1.5
by jonathanyc on Thursday July 09, 2015 @01:01AM
(#9856233)
Obviously you could implement any algorithm using reference counting instead of garbage collection. The question is whether or not you really want to pepper your code with what is essentially manual memory management when necessary.
Re:Go GC: Solving the Latency Problem in Go 1.5
by throwa990323249 on Friday July 10, 2015 @07:10PM
(#9867547)
ARC languages are Turing complete, but some algorithms require more than just "peppering weakrefs" and actually require you to essentially build your own GC.
It's something I find annoying about some ARC/Rust enthusiasts: their belief that because they haven't found need for a GC, that there isn't one.