On Fri, Jul 17, 2009 at 03:39:02PM -0500, David Nicol wrote: > On Fri, Jul 17, 2009 at 3:04 PM, Ben Morrow <ben@morrow.me.uk> wrote: > > In the end, I find the idea of having to create an object with a DESTROY > > method when all you want to do is run some code at the appropriate time > > rather messy. > > > Me too. And supporting the "DESTROY as scope-end hack" also wrecks the > possibility of switching garbage collection paradigms. (how much mindshare > did the proposed "volatile" attribute get? Probably not a lot, since in the > absence of alternate GC methods everything is volatile anyway, rendering > C<:volatile> a no-op) I remember Dan Sugalski once pointing out that you can decouple the garbage collection time from the out of scope effects. I think there's too much perl5 code that depends on DESTROY being run when the object goes out of scope to be able to change this. I for one have written, and will continue to write, lots of code that depends on this. AbigailThread Previous | Thread Next