From: Michael Neumann Date: 2001-10-24T08:27:37+09:00 Subject: [ruby-talk:23121] Re: Bruce Eckel's opinion of Ruby Avdi B. Grimm wrote: > > Using this there is no need for destructors. > > 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. True. You cannot do everything with blocks. In Ruby you have class ObjectSpace that lets you define finalizer methods. This is not very nice, but it works. Regards, Michael -- Michael Neumann merlin.zwo InfoDesign GmbH http://www.merlin-zwo.de