Python's biggest compromises
hanzspam at yahoo.com.au
Fri Aug 1 09:04:55 CEST 2003
anthony_barker at hotmail.com (Anthony_Barker) wrote in message news:<899f842.0307310555.56134f71 at posting.google.com>...
> What to you think python largest compromises are?
I think reference counting is. Added to this the fact that
garbage collection is also possible (as in Jython). So we get
the worst of both worlds.
1. Idioms like this won't work portably:
f = file('x')
Even though f.__del__ closes the file, in garbage
collected environment the f object might not get deleted
in a good while, and would cause problems.
2. And then, we still need to use weakref to ensure
that our crossreferenced stuff works both with and without GC.
Worst of both indeed. Maybe the decision to choose reference
counting was driven by speed considerations. That might've
been reasonable back in early 90's, but GC techniques have
evolved from those days and so GC would be a superior
Well, since no one else pointed this out yet, maybe there's
some flaw in my reasoning.
More information about the Python-list