does python have useless destructors?

Slawomir Nowaczyk slawek at cs.lth.se
Wed Jun 16 11:11:13 EDT 2004


On Tue, 15 Jun 2004 12:16:51 +0200
"Marcin 'Qrczak' Kowalczyk" <qrczak at knm.org.pl> wrote:

#> On Tue, 15 Jun 2004 01:09:05 -0700, David Turner wrote:

#>> So what I'll do is write a PEP to fix the exception handling semantics
#>> in CPython, and hope that pressure from users who discover how much
#>> easier it is to write RAII -style code will eventually introduce
#>> reference counting to Jython and friends.

#> Jython will not switch to reference counting, and programs relying
#> on destructors run immediately are still broken, relying on an
#> implementation detail of CPython.

Code relying on destructors being run is not "broken", it is "relying
on implementation of CPython". Those are two different things.

Hopefully, at some point, destruction semantic will find its way into
the language itself and then Jython will either have reference
counting or be "broken" ;-)

In my very personal and definitely biased opinion, getting working
destructors is more important than maintaining compatibility with
Jython (although I hope achieving *both* is possible). YMMV.

-- 
 Best wishes,
   Slawomir Nowaczyk
     ( Slawomir.Nowaczyk at cs.lth.se )

Quidquid latine dictum sit, altum viditur.
        (Anything said in Latin sounds profound.)





More information about the Python-list mailing list