Hi,
I'm wondering why there's no condition for NO-PRIMARY-METHOD. I believe
it would be useful to have such a condition. The specific situation
looks like this:
(defclass parent () ())
(defclass child (parent)
((my-slot :accessor my-slot :initarg :my-slot :initform nil)))
(defgeneric f (x))
(defgeneric f* (x s))
(defmethod f ((x parent)) ...)
(defmethod f ((x child))
(f* x (my-slot x)))
What I'm trying to show here is that f* is replacing f for that
subclass.
The problem I have with doing this is that as soon as your SMC hits this
child class, it changes the protocol from using f to f*, which I don't
like. So what I was thinking of was more like:
(defmethod f :around ((x child))
(handler-case (f* x (my-slot child))
(no-primary-method () (call-next-method))))
Is this completely unnecessary? Is this nothing to worry about? My
primary concern is that programmers may use multiple inheritance and
mixin classes with `child', and want it to be as safe as possible for
them to still use f instead of f*.
dave