From: Erik Naggum
Subject: Re: design question
Date: 
Message-ID: <3196428109878469@naggum.net>
* ·······@hotmail.com
> What's the best design for such a system where an object inherits not from
> another class, but from an _instance_ of a class?

  I would use a slot named "inherits-from" and write a slot-unbound method
  that looks up the value of any unbound slots in this object in the object
  pointed to by that slot, instead.  This affords a dynamic inheritance
  mechanism.

  If the inheritance is static, i.e., the value of any unspecified slots is
  _copied_ into the object that inherits from the parent object, do the
  copy before you do any other initialization.

#:Erik
-- 
  I found no peace in solitude.
  I found no chaos in catastrophe.
			-- :wumpscut:

From: Vladimir V. Zolotych
Subject: Re: design question
Date: 
Message-ID: <3ADC10A3.A6521B35@eurocom.od.ua>
Erik Naggum wrote:
> 
>   If the inheritance is static, i.e., the value of any unspecified slots is
>   _copied_ into the object that inherits from the parent object, do the
>   copy before you do any other initialization.

I'm new to CLOS. Would you mind to explain what do you mean in the
sayings above, especially in "...do the copy before you do any other 
initialization."

-- 
Vladimir Zolotych                         ······@eurocom.od.ua
From: Jochen Schmidt
Subject: Re: design question
Date: 
Message-ID: <9bhqcb$9bh5h$1@ID-22205.news.dfncis.de>
Vladimir V. Zolotych wrote:

> Erik Naggum wrote:
>> 
>>   If the inheritance is static, i.e., the value of any unspecified slots
>>   is _copied_ into the object that inherits from the parent object, do
>>   the copy before you do any other initialization.
> 
> I'm new to CLOS. Would you mind to explain what do you mean in the
> sayings above, especially in "...do the copy before you do any other
> initialization."

If you copy the "static-inherited" values before any other initialization, 
then it is possible to overwrite them by using initialization-keyword args 
in make-instance or when using a :initform in a subclass.

Regards,
Jochen