[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: :allocation slot-option issues
- To: Moon@STONY-BROOK.SCRC.Symbolics.COM
- Subject: Re: :allocation slot-option issues
- From: Danny Bobrow <Bobrow.pa@Xerox.COM>
- Date: 6 Jan 87 01:40 PST
- Cc: Common-Lisp-Object-System@SAIL.STANFORD.EDU
- In-reply-to: David A. Moon <Moon@STONY-BROOK.SCRC.Symbolics.COM>'s message of Tue, 6 Jan 87 00:27 EST
- Sender: Bobrow.pa@Xerox.COM
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