From ... Path: supernews.google.com!sn-xit-03!supernews.com!logbridge.uoregon.edu!news.maxwell.syr.edu!uio.no!Norway.EU.net!not-for-mail From: Erik Naggum Newsgroups: comp.lang.lisp Subject: Re: design question Date: 16 Apr 2001 16:41:49 +0000 Organization: Naggum Software, Oslo, Norway Lines: 18 Message-ID: <3196428109878469@naggum.net> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: oslo-nntp.eunet.no 987439309 12334 195.0.192.66 (16 Apr 2001 16:41:49 GMT) X-Complaints-To: newsmaster@eunet.no NNTP-Posting-Date: 16 Apr 2001 16:41:49 GMT Mail-Copies-To: never User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7 Xref: supernews.google.com comp.lang.lisp:9316 * 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: