Subject: Re: design question
From: Erik Naggum <erik@naggum.net>
Date: 16 Apr 2001 16:41:49 +0000
Newsgroups: comp.lang.lisp
Message-ID: <3196428109878469@naggum.net>

* iscaris@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: