From: Neil Hodgson Date: 2001-10-24T08:47:33+09:00 Subject: [ruby-talk:23124] Re: Bruce Eckel's opinion of Ruby Avdi B. Grimm: > I have to disagree with this statement. There *are* cases where the > block paradigm is simply not appropriate, and destructors are. > Sometimes it's possible to kludge in a solution using the block > paradigm; but it's not pretty. It's not a terribly rare occurance to > have objects which (a) /must/ release resources before being > garbage-collected, and (b) have non-determinate lifetimes. Deterministic finalization (DF) is a great feature but the Jython implementation of Python on the JVM does not provide this as it is hard to implement over the Java based semantics of the JVM. Even if Jython were to implement this for objects it is totally responsible for it needs to interoperate with Java based code by, for example, returning pointers (or wrappers) to these objects to Java code. It is unlikely that Python for .NET will have deterministic finalization for the same reason. The lack of DF in .NET has caused a lot of angst among us old COM developers since COM is based on reference counting with DF. The safe portable route is currently garbage collection as that is used in the most widely used / soon-to-be-used VMs and can also be implemented for self-contained implementations like Ruby and standard Python. The difficulty in providing DF on the JVM and .NET is an example of how these environments require changes to the languages hosted on them. I'm sure there will be Ruby features (possibly closures) that can not be implemented reasonably on these VMs. Neil