Sverker Wiberg <[EMAIL PROTECTED]> writes:

> However, the above defclass doesn't work in CMUCL; as I get the error
>
>    Type-error in KERNEL::OBJECT-NOT-TYPE-ERROR-HANDLER:
>       :DYNAMIC is not of type (MEMBER :CLASS :INSTANCE)
>       [Condition of type TYPE-ERROR]
>
> which agrees with both the HyperSpec and CLtL2 in that the :allocation
> slot option is either :class or :instance. (That ":allocation :dynamic"
> worked in SBCL was just me being lucky, I guess.)

If you "being lucky" means someone spent a day at LSM2004 making this
work in sbcl, yes, you're lucky. :-)

Seriously, I think that how you did it is essentially how you're meant
to do it; that CLtS-conforming code requires :class or :instance
allocation doesn't mean that implementations purporting to conform to
(some of) the MOP can't allow you to use other allocation types.  For
what it's worth, my translation of that exercise in AMOP is in
tests/mop-1.impure-cload.lisp in the sbcl distribution -- having made
it work once, I don't want that functionality to regress.

Cheers,

Christophe


Reply via email to