Marc Dzaebel wrote:
>
> I need to define an inheritance behavior that concatenates string-values
> of superclass-initforms with local slot initforms. E.g.
>
> (defclass super() ((f :accessor f :initform "head")) (:metaclass
> user-class))
> (defclass sub(super) ((f :accessor f :initform "tail")) (:metaclass
> user-class))
>
> I'd like to get the following:
>
> (f(make-instance'sub)) -> "head tail"
>
> I didn't find a standard option in defclass slot-descriptions for this.
> I'd like to define the concatenate combination for each meta-class
> 'user-class'.
>
> Any idea? Thanks in advance!
>
> Yours, Marc Dzaebel
Dear Heiko,
once again this is an amazingly perfect answer. Even for bigger
class hierarchies this creates concatenated strings according
to the class precedence list. It appears I should have looked
in Chapter B of Allegros MOP-Concepts. It's a pitty that we
can't develop such things portable from scratch as it's not
yet standardized.
Thank you again for transfering you PLOB experience
(http://www.lisp.de/software/plob) to me ;-)
Yours, Marc