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

change to instance structure protocol

  Gabriel writes:

   I haven't studied it (because I'm sitting down to eat a turkey) but I
   think the extra level is merely a convenience rather than a
   significant feature. A user writes:

   (defmethod slot-value-using-class ((class standard-class)
				      (object standard-object)
				      (slotd standard-effective-slot-definition))
     (let ((original-value (slot-description-reader slotd object)))
       (if no-error-p
	 (if (eq original-value (unbound-slot-value))
	     (slot-unbound object slot-name)

   (defmethod slot-description-reader ((slotd local-slot-description) object)

   (defmethod slot-description-reader ((slotd shared-slot-description) object)

   and users of this system are able to have the slot description class
   have precedence or not, as he wishes.

Sure.  And in EuLisp I could write:

... a bunch of defclasses...

(defmethod slot-description-reader ((slotd standard-effective-slot-definition)
                                    (object standard-object))
  (slot-value-using-class (class-of object) object slotd))

(defmethod slot-value-using-class ...)

and get the CLOS behavior.  But neither of these are in each others'
respective specifications.  The question to me is, which way, if
either, better meets the goals of MOPpiness.  And, more generally,
what are those goals?

For example, if we want slot definitions and metaclasses to be
relatively independent, how does that affect the inheritance protocol?

-- Harley