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

Re: :allocation slot-option issues



From: David A. Moon <Moon@STONY-BROOK.SCRC.Symbolics.COM>

        Date: 5 Jan 87 11:07 PST From: Danny Bobrow
        <Bobrow.pa@Xerox.COM>

        ....Specification of Inheritance

        None of :reader :accessor :allocation or
        :initialize-only (if we still have that) are inherited....

    We decided at the meeting in Menlo Park that :reader and
    :accessor are inherited.  It is difficult to see how it could be
    otherwise if they are defined in terms of defmethod.

    Comments on the rest of your message to follow at some later
    date.

Of course the methods generated by :reader and :accessor are inherited,
but not the features of the slot.  That is

(defclass foo () ((x :initform 1 :reader foo-x)))

effectively generates

(demethod foo-x ((obj foo)) (slot-value obj 'x))
     but 
(defclass fie (foo) ((x :initform  2)))
     does not generate
(defmethod foo-x ((obj fie)) (slot-value obj 'x))

although (foo-x (make-instance 'fie)) --> 2