Subject: Re: Importing slot values from an existing object
From: (Rob Warnock)
Date: Wed, 09 Aug 2006 05:09:54 -0500
Newsgroups: comp.lang.lisp
Message-ID: <>
Chaitanya <> wrote:
| Ken Tilton wrote:
| > Sounds even fishier. What would the names of the two classes be?
| There's more than two classes. I have one base class, and a few
| subclasses with specialized methods for them. I want to preserve the
| original object so I can export its slots to instances of different
| subclasses.

Is there only one such "original object"? Are the values of its
slots essentially read-only? If so, have you looked into using
the (:ALLOCATION :CLASS) slot option when defining A? Then all
instances of A, *including* all instances of B, will share the
same slots. [Well, for those slots of A for which you specify

If not, then maybe what you really want is not CLOS but a
prototype-based object system such as provided by, say, KR
(available as a part of the Garnet distribution or now by
itself, see <>).


Rob Warnock			<>
627 26th Avenue			<URL:>
San Mateo, CA 94403		(650)572-2607