Re: making copies of class instances

From: Ken Anderson <KAnderso_at_bbn.com>
Date: Tue, 7 Jan 1997 12:26:46 -0500

At 19:49 1/6/97, Brian Denheyer wrote:
>
>This is actually what I want...but, if I didn't want this to happen how
>would I set up the foo-bar object with a local copy of foo ?
>
>I think that I am asking if there is a "neat" way of doing
>a deep-copy of an instance of a class.

Common Lisp, for example does not provide a built in copy operation because
the semantics are too application specific. You can write your own copy
method for each of your classes. I like to use a hash table argument that
is used to preserve eq? ness in the copy. You could write a method on
<object> that used the metaobjects to provide a default deep copy of any
instance if that is appropiate for your application.

k
Received on Tue Jan 07 1997 - 18:22:35 CET

This archive was generated by hypermail 2.3.0 : Mon Jul 21 2014 - 19:38:59 CEST