Hacker News new | ask | show | jobs
by solidsnack9000 3447 days ago
The right comparison for ARC is with manual memory management -- not GC.
2 comments

Depends on what your point is. Both ARC and GC are approaches to limit the complexity and difficulty of memory management. As such, I think it's very reasonable to compare them, because they're different approaches to the same underlying problem.

FWIW, as someone who was a Java programmer for over a decade before learning Objective C right after ARC came on the scene, I greatly prefer ARC over garbage collection. I find the things you have to remember to think about with both ARC and GC (e.g. circular references and unintentionally strongly reachable references) to be about the same cognitive load, but the deterministic, predictable behavior of ARC means you won't have to try to debug random GC hangs that only happen in prod under heavy load and the subsequent fiddling with a million GC options to get performance to be acceptable.

ARC is a GC implementation algorithm, you probably mean tracing GC algorithm.

"The Garbage Collection Handbook", chapter 5

http://gchandbook.org/

I think it is time for you to buy more books.
I have a very good collection of CS books and papers about programming languages and compiler design...
I'm actually excited about server-side Swift for exactly this reason. It's early days though.
Not really. They are both valid comparisons, since ARC is much easier to work with than manual management and can offer more predictable performance than GC. That said, it's also slower than manual management and can be trickier to work with than GC.
ARC is a GC implementation algorithm, you probably mean tracing GC algorithm.

"The Garbage Collection Handbook", chapter 5

http://gchandbook.org/