[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: IGNORE on specialized parameters in methods



    Date: Tue, 30 Aug 88 15:39:57 EDT
    From: rich%linus@mitre-bedford.ARPA

    On page 2-43 of the 88-002 draft, the documentation for DEFMETHOD says
    that each of the specialized parameters will be referred to by
    DEFMETHOD's expansion. I wondered what the motivation for this was. 

Very often, an argument passed to a generic function is used to
specialize the method lookup, but then not actually used in the body of
the method.  Here is an example from PCL:

(defmethod slot-unbound ((class standard-class) instance slot-name)
  (error "The slot ~S is unbound in the object ~S." slot-name instance))

This rule was put in for convenience when defining methods like this.
-------