[elephant-devel] Re: MOP operations in elephant's metaclasses.lisp

Ben ben at medianstrip.net
Tue Nov 9 22:34:10 UTC 2004


Thanks for the info.  We'll keep this in mind for the next release
which will fix the MOP issues (hopefully!)  If you need elephant for
CLISP sooner than that (which should be in a couple of months or so),
let us know.

take care, B

On Tue, 9 Nov 2004, Bruno Haible wrote:

> Hi,
>
> Looking what it would take to port elephant-0.2.1 to GNU CLISP (which has
> a fully functional MOP now, i.e. in the next release), I found two portability
> problems, both in metaclasses.lisp:
>
> 1.
> (defmethod slot-definition-allocation ((slot-definition persistent-slot-definition))
>  :class)
>
> The MOP does not allow this. (The section "Implementation and User Specialization"
> allows extending a GF such as slot-definition-allocation, but here you are
> overriding the predefined method.) The right way to force a given property for
> a slot-definition instance is an initialize-instance method. For example
>
>  (defmethod initialize-instance :around ((slot persistent-slot-definition) &rest args)
>    (apply #'call-next-method slot :allocation :class args))
>
> 2.
> (defmethod compute-effective-slot-definition-initargs ((class persistent-metaclass) slot-definitions)
>
> The generic function compute-effective-slot-definition-initargs is not specified
> by the MOP. But fortunately CLISP has it.
>
> Bruno
>




More information about the elephant-devel mailing list