News for hackers. Stuff that matters.
Re:Garbage Collection is Wrong by rian on Thursday February 27, 2014 @04:51PM (#7315389)
My point is that, what GCs do at runtime (discover garbage) can be done statically in all of these cases. The sole reasons GCs do that work at runtime is because of cycles.

Cycles aren't common at all and the answer shouldn't be "let's create a huge complex GC that handles all cases, then down the road we'll optimize for the common case" the answer should be "let's do the sane reasonable thing that handles the common case and push the problem of cycle-management to the programmer"

Re:Garbage Collection is Wrong by lokedhs on Friday February 28, 2014 @05:36AM (#7317997)
Someone mentioned returning a closure from a function. That's something that is done all the time in higher-level languages and hard to do without a GC.

Also, in general GC's are much faster than reference counting (especially when the reference count updates needs to be thread-safe), so the only reason one would use them is to have deterministic object destructions. These aren't common at all and should not be the deciding factor when choosing a memory management scheme.