does python have useless destructors?

David Turner dkturner at telkomsa.net
Mon Jun 14 03:00:39 EDT 2004


Isaac To <kkto at csis.hku.hk> wrote in message news:<7ipt83o6qp.fsf at enark.csis.hku.hk>...
> 
> Jython is not a separate language.  It is just our favourite Python
> language, running under the Java virtual machine.  Perhaps it is "stifling"
> the development of the Python language, but if it is, it is because we
> explicitly *don't* want to introduce language dependency (i.e., don't depend
> on C-Python implementation) rather than that we want to depend on a certain
> language.  Different people will have different idea about whether this is a
> good thing.  For me, I'd say that I prefer finding a different solution to
> problems arising from the unspecified finalization behaviour, because
> specifying the finalization time will more or less remove a use-case of the
> Python language completely, and I do think that being able to use Python
> within Java and able to use Java objects from Jython code without additional
> "glue code" is something that should be dearly treasured.  It is especially
> the case because the lack of specification about when finalization happens
> is, most of the time, not an issue at all.

You don't have to specify the finalization time in order to make the
destructors work.  Destruction and finalization are *different
things*.

The D programming language somehow contrives to have both garbage
collection and working destructors.  So why can't Python?


Regards
David Turner



More information about the Python-list mailing list