Allowing ref counting to close file items bad style?

sjdevnull at yahoo.com sjdevnull at yahoo.com
Wed Aug 30 13:07:18 EDT 2006


Paul Rubin wrote:
> "sjdevnull at yahoo.com" <sjdevnull at yahoo.com> writes:
> > > > (And personally I think the benefits to programmers of guaranteeing
> > > > ref-counting semantics would outweigh the additional headaches for
> > > > Jython and other alternative implementations).
>
> Ref counting is a rather primitive GC technique

I disagree strongly with this assertion.  It's not as efficient overall
as other GC implementations, but it's not a case of "less efficient to
do the same task".  Reference counting buys you deterministic GC in the
pretty common case where you do not have circular references--and
determinism is very valuable to programmers.  Other GCs be faster, but
they don't actually accomplish the same task.

I can come up with plenty of "superior" algorithms for all kinds of
tasks if I'm not bound to any particular semantics, but losing
correctness for speed is rarely a good idea.




More information about the Python-list mailing list