From: Didier Verna on 11 Jan 2010 10:47 Hi, the standard defines two generic functions: slot-missing and slot-unbound. However, slot-unbound triggers an unbound-slot error by default, whereas slot-missing only triggers an error. So why the difference ? -- Resistance is futile. You will be jazzimilated. Scientific site: http://www.lrde.epita.fr/~didier Music (Jazz) site: http://www.didierverna.com
From: Barry Margolin on 11 Jan 2010 11:52 In article <muxhbqsy775.fsf(a)uzeb.lrde.epita.fr>, Didier Verna <didier(a)lrde.epita.fr> wrote: > Hi, > > the standard defines two generic functions: slot-missing and > slot-unbound. However, slot-unbound triggers an unbound-slot error by > default, whereas slot-missing only triggers an error. So why the > difference ? SLOT-UNBOUND is a data error, and you're likely to want to create a specific handler and restart that allows you to correct this. Many implementations may even provide default restarts that offer to let you fill in the slot from the debugger. SLOT-MISSING, on the other hand, is more of a programming error. It's less likely that you'd be able to do anything useful in a handler specific to this error. -- Barry Margolin, barmar(a)alum.mit.edu Arlington, MA *** PLEASE post questions in newsgroups, not directly to me *** *** PLEASE don't copy me on replies, I'll read them in the group ***
From: Duane Rettig on 11 Jan 2010 11:56 On Jan 11, 7:47 am, Didier Verna <did...(a)lrde.epita.fr> wrote: > Hi, > > the standard defines two generic functions: slot-missing and > slot-unbound. However, slot-unbound triggers an unbound-slot error by > default, whereas slot-missing only triggers an error. So why the > difference ? Slot-unbound is simply a data error: you've failed to supply some data for your instance. Slot-missing is a category error; you are trying to describe structure which you have not defined in your class. Duane
From: Didier Verna on 12 Jan 2010 03:42 Thanks to you and Duane ! Barry Margolin <barmar(a)alum.mit.edu> wrote: > SLOT-MISSING, on the other hand, is more of a programming error. It's > less likely that you'd be able to do anything useful in a handler > specific to this error. Well, the debugger could offer to activate the ContextL layer I forgot ;-) -- Resistance is futile. You will be jazzimilated. Scientific site: http://www.lrde.epita.fr/~didier Music (Jazz) site: http://www.didierverna.com
From: Rahul Jain on 12 Jan 2010 22:40 Duane Rettig <duane(a)franz.com> writes: > Slot-unbound is simply a data error: you've failed to supply some data > for your instance. Slot-missing is a category error; you are trying > to describe structure which you have not defined in your class. Unless you're me, writing my prototypes library. :( -- Rahul Jain rjain(a)nyct.net Professional Software Developer, Amateur Quantum Mechanicist
|
Next
|
Last
Pages: 1 2 3 4 5 Prev: Mandatory initialization of a slot Next: The Erik Naggum cll archive |