On Wednesday, 5 February 2014 at 15:57:51 UTC, Ola Fosheim
Grøstad wrote:
If you write code in a way that does not create much cycles you
don't have to call the GC at all. So getting the GC out of the
implicit allocations the language make might be the most
important thing, but how much memory is wasted over an hour
that way?
It is up to programmer to decide. Right now he does not have a
choice and sometimes you can't afford to have GC in your program
at all (as in can't have it linked to the binary), not just can't
call collection cycles. Having sane fallback is very desired.
Proposed solution does not seem to save you from uncontrollably
long collection cycles anyway as it still uses same memory pool
so I don't see how it can help even games, not even speaking
about more demanding applications.
A game should perhaps run for 1 hour without a hiccup, ARC
might be good enough if RC collect 98% of all garbage.
A real time audio application should run for 12 hours without a
hiccup… you probably want a GC free audio callback.
A real time server that monitors some vital resource should run
for hours without a hiccup... You either want a real time GC or
no GC.
Different scenarios have different needs.
Haven't you just basically confirmed my opinion? :)