[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Message passing
- To: (BUG LISPM) at MIT-AI
- Subject: Re: Message passing
- From: HENRY@MIT-AI (Sent by HENRY0@MIT-AI)
- Date: Tue ,31 Oct 79 12:48:24 EDT
I'd like to make a suggestion for a change to the
microcode for SELECT-METHODS which I think will
make them more general without signficant loss in efficiency.
Right now, the method to be invoked is selected by
doing an ASSQ-like search down the method list, using the
first argument as a key. This means that a method must declare
which symbols it responds to when you create the method. The
method can't apply a function at run time to decide whether to
accept the message or let another method handle it.
What I'd like is another kind of entry in the method list, which
supplies a predicate to be applied to the message [the &rest of the
<- call] and if that predicate returns true, the method in that entry is
selected [called with the message as argument],
otherwise continue down the method list.
This is useful in many situations. For instance, it helps with
multiple superclass types of things, because a method can
conditionally decide to accept a message based on whatever it
wants, say its current viewpoint.
What do you think?