MOP metaclass extensibility question
I am using the Linux Personal Edition of Lispworks to evaluate
Lispwork's current MOP capabilities. Specifically, I'm looking into
the ability to use the MOP to create specialized
direct-slot-definition objects based on the use of an extended
defclass slot option; silly e.g.:
(defclass test ()
((regular :initform 3)
(extended :extended-slot t :initform 4))
(:metaclass extended-class))
(defmethod clos:direct-slot-definition-class ((class extended-class)
initargs)
(if (getf initargs :extended-slot)
'extended-direct-slot-definition
(call-next-method)))
where extended-class is a subclass of standard-class and
extended-direct-slot-definition is a subclass of
standard-direct-slot-definition.
The problem I'm having is that Lispwork's
canonicalize-defstruct-slot complains about the extended slot
option before the protocol gets to determining/initializing the
slot-definition object. Is there a Lispwork's idiom supporting
this type of metaclass extensibility or am I at a dead end?
Any advice is greatly appreciated--especially as a Personal
Edition (trial) user who is not yet a paying customer...