Barry Warsaw <[EMAIL PROTECTED]> writes:
> I don't see how that helps. I can remove all references to the
> object but I still have to wait until gc runs to free it. Can you
> explain your idea in more detail?
Objects which should be closed deterministically have the closing
action decoupled from the lifetime of the object. They are closed
explicitly; the object in a "closed" state doesn't take up any
sensitive resources.
> I just think that it's important to remember that there are use
> cases that reference counting solves. GC and refcounting both have
> their pros and cons.
Unfortunately it's hard to mix the two styles. Counting all reference
operations in the presence of a real GC would imply paying the costs
of both schemes together.
> I tend to think that Python's current refcounting + cyclic gc is the
> devil we know, so unless there is a clear, proven better way I'm not
> eager to change it.
They are different sets of tradeoffs; neither is universally better.
I claim that a tracing GC is usually better, or better in overall,
but it can't be proven to be better in all respects.
Changing an existing system creates more compatibility obstacles than
designing a system from scratch. I'm not convinced that it's practical
to change the Python GC now. I only wish it had a tracing GC instead.
--
__("< Marcin Kowalczyk
\__/ [EMAIL PROTECTED]
^^ http://qrnik.knm.org.pl/~qrczak/
_______________________________________________
Python-3000 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe:
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com