Path: utzoo!attcan!utgpu!news-server.csri.toronto.edu!clyde.concordia.ca!uunet!samsung!zaphod.mps.ohio-state.edu!usc!snorkelwacker!ai-lab!rpk From: rpk@wheaties.ai.mit.edu (Robert Krajewski) Newsgroups: comp.lang.lisp Subject: Re: Destructors in Lisp and CLOS Summary: It would be nice to have the GC help you... Message-ID: <9862@rice-chex.ai.mit.edu> Date: 12 Aug 90 20:03:20 GMT References: <3296@stl.stc.co.uk> <116718@linus.mitre.org> Reply-To: rpk@rice-chex.ai.mit.edu (Robert Krajewski) Distribution: comp.lang.lisp,uk.lisp Organization: MIT Artificial Intelligence Laboratory Lines: 24 In article <116718@linus.mitre.org> dsr@luke.mitre.org (Douglas S. Rand) writes: Although this [destructors] might be useful this is not a goal of CLOS. Also it is generally antithetical to the view of the LISP world. It is the job of the GC to clean >up allocated unused storage. Yes, but since the one of the breat benefits of Lisp is that you don't have to write your own garbage collector, it would be nice to extend it in ways that CLOS can exploit. For example, an object may hold onto something that is outside the Lisp universe, like some kind of operating system resource. There is no way for the GC to reclaim it, but it *could* ask the object to do so. It's pretty clear that this kind of extension can be fraught with peril (for example, the reclamation method better not store its object into anything except lexical places that cannot have a lifetime beyond the execution of the method itself), but it could be useful. -- Robert P. Krajewski Internet: rpk@ai.mit.edu ; Lotus: robert_krajewski.lotus@crd.dnet.lotus.com