From: Didier Verna on

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
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
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

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
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