On Thu, Jul 24, 2014 at 5:46 AM, Sandro Magi <[email protected]> wrote:

> On 23/07/2014 10:34 PM, David Jeske wrote:
> > Easiest programming model? Precise generational compacting
> > collector... if you can accept the world-stop problem.
>
> The easiest programming model is clearly an incremental collector, like
> full ref counting with cycle collection. Mismanaged finite resources
> like file handles are then guaranteed to be collected as soon as they
> are no longer referenced. This GC is just very expensive.
>

This is a good point.... However, immediate collection is only guaranteed
if the objects don't participate in cycles. This means small programs get
to experience immediate collection, but any cyclic data-structures make
collection/finalization delayed just like GC. Personally, I think this
"sometimes immediate sometimes not" issue is complicated to explain, so I
don't think it's that much of a simplicity advantage in the general case.

That said, for small programs, and learning, where cycles are uncommon,
making reclamation immediate, I agree it's a simpler model. Python being a
case in point. Because it's used heavily for small scripting tasks, there
are seldom complex data-structures which generate cycles so it's "usually"
immediate finalization and easier to understand.

Devils in the details.
_______________________________________________
bitc-dev mailing list
[email protected]
http://www.coyotos.org/mailman/listinfo/bitc-dev

Reply via email to