[Python-3000] PEP: Eliminate __del__
Michael Bayer
mike_mp at zzzcomputing.com
Sat May 5 21:46:51 CEST 2007
On May 5, 2007, at 6:12 AM, Nick Coghlan wrote:
>
> The reason for initially pursuing a recipe approach for weakref
> based finalisation is that it allows time to determine whether or
> not there are better recipes than whatever is proposed in the PEP
> before casting it in the form of fixed language syntax. Adding
> syntactic sugar for a recipe is child's play compared to trying to
> get rid of syntax (or change its semantics) after discovering it is
> broken in some fashion.
>
if the recipe is just an interim step towards developing something
that "just works", then we agree. obviously explicit finalization
is preferable and relying upon cpython's "immediate" GC of non-cycled
objects is a bad trap to fall into (particularly if you then run the
same code using Jython for example)...but in a garbage collected
language, the "loose ends" still need some way to clean themselves up
even if its deferred.
More information about the Python-3000
mailing list