Smalltalk and Python
aleaxit at yahoo.com
Wed Dec 13 05:01:46 EST 2000
"Erno Kuusela" <erno-news at erno.iki.fi> wrote in message
news:kuzoi15d60.fsf at lasipalatsi.fi...
> | - garbage collection is reference counted, though now enhanced in Python
> | 2.0 so it can handle most cases of circular references
> i don't think there are any situations in which the 2.0 system
> would not handle them.
I think that, if the objects in a circular-references loop have
user-defined __del__ methods, the 2.0 GC (quite reasonably)
will not remove them (as any order of removal might cause some
trouble or other in the general case).
> in fact the refcounting + "real" gc combination is much nicer than
> pure gc, because of the predictable finalisation behaviour.
The counterpoint to that is performance -- a good modern 'pure
GC' approach can squeeze substantially more performance out of
a system, than a 'pure RC' or 'mixed GC/RC' approach. It's a
moot point whether somewhat-predictable-finalization is worth
that much (judging from the squeals about it on discussion
forums related to Microsoft .NET -- which moves to "pure GC",
while Microsoft's previous tradition was for reference counting --
one might think so -- but, IMHO, that's partly an artefact of
what people developing for MS platforms were previously used to;
I have not seen anything like that amount of heat concerning
the same "pure GC" when a language/environment uses it right
from the start, cfr. Lisp, Scheme, Smalltalk, Java, Eiffel...).
> | It's an absolutely stunning language for free, and although not as fast
> | as Perl
> (it's as fast in my experience)
Mine too. But, more significantly, Lutz Prechelt's important
empirical study also showed no statistically significant
difference between equivalent programs for a given task as
developed in Perl or Python (there _was_, if I recall this
correctly, statistical significance to other performance
comparisons -- C/C++ programs a bit faster, Java, Tcl,
and Rexx slower, than the Perl/Python 'cluster').
More information about the Python-list