does python have useless destructors?
Marcin 'Qrczak' Kowalczyk
qrczak at knm.org.pl
Thu Jun 17 13:18:44 EDT 2004
On Thu, 17 Jun 2004 07:22:22 -0700, David Turner wrote:
>> I will repeat: it's unimplementable efficiently when
>> Python runtime is hosted by a language with non-refcount GC.
>
> So are we to take it that efficiency considerations are a serious
> impediment to a potentially valuable safety feature?
Yes, if the efficiency difference is big enough. I don't know if it's big
enough; perhaps it is.
But there is another reason: adding refcounting would complicate
interfacing between Python and the host language, and would introduce
the possibility of bugs in refcounting.
The correct way is to provide a good syntax for explicit bracketing of the
lifetime of an object. try...finally works but is ugly.
--
__("< Marcin Kowalczyk
\__/ qrczak at knm.org.pl
^^ http://qrnik.knm.org.pl/~qrczak/
More information about the Python-list
mailing list