[rucksack-devel] inherited slots

Arthur Lemmens alemmens at xs4all.nl
Wed Nov 15 08:15:14 UTC 2006


Cyrus Harmon wrote:

> so when I set a class to have metaclass rucksack:persistent-class,
> the direct slots are persistent, but not the indirect (or inherited,
> whatever the proper term is) slots. Is this by design?

No.  See e.g. test-index-1a.lisp for a counter-example.

> e.g. if I do this:
>
> (defclass person ()
>    ((name :initform (elt *names* (random (length *names*)))
>           :accessor name)
>     (age :initform (random 100) :accessor age)))
>
> (defclass persistent-person (person)
>    ()
>    (:metaclass persistent-class))
>
> then persistent-person will not have persistent name and age slots,

I haven't tested this, but I think it would be wise to add the
(:METACLASS PERSISTENT-CLASS) option to the PERSON class too.

Arthur




More information about the rucksack-devel mailing list