Newsgroups: comp.lang.smalltalk
Path: cantaloupe.srv.cs.cmu.edu!nntp.club.cc.cmu.edu!goldenapple.srv.cs.cmu.edu!das-news2.harvard.edu!news.dfci.harvard.edu!camelot.ccs.neu.edu!news.mathworks.com!howland.erols.net!blackbush.xlink.net!ins.net!heeg.de!uucp
From: Hasko Heinecke <hasko@heeg.de>
Subject: Re: postCopy...
Content-Type: text/plain; charset=us-ascii
To: Santhanam <santhanam@aol.com>
Message-ID: <334A4B0D.237C228A@heeg.de>
Sender: uucp@heeg.de
Content-Transfer-Encoding: 7bit
Organization: Georg Heeg - Object-Oriented Systems
References: <19970403022200.VAA21021@ladder01.news.aol.com>
Mime-Version: 1.0
Date: Tue, 8 Apr 1997 13:41:33 GMT
X-Mailer: Mozilla 3.01Gold (X11; I; SunOS 4.1.3 sun4c)
Lines: 36

Santhanam wrote:
> 
> Could anybody tell me why there is no deepCopy in VisualWorks?

Because it's semantics are not well defined. What is 5 deepCopy? What
about objects that ought to be unique, like Customers identified by
their customerNumber?

You would have to implement deepCopy sepcifications like GemStone does
it for object replication. Most of the time, deepCopy is used for all
sorts of buffering changes and for object versioning. For the first case
there are BufferedValueHolders. The second problem needs more work...
What do you need deepCopy for?

The idea behind postCopy is that you can specify how to copy
semantically coupled objects. This can only be done on a class-by-class
basis. Sometimes you even need context-based variants.

> How do we get a true copy of a Collection, since there is no postCopy in
> the Collection class?

Of course not. It's inherited from object.

By the way: You get a true copy of the Collection by sending it #copy.
It's a copy of the Collection instance with all the same contents. But I
understand what you mean.

> 
> Mahesh (santhanam@aol.com)

Hasko
-- 
+------------------------------------------------------+
| Hasko Heinecke, Georg Heeg - Object-Oriented Systems |
| mailto:hasko@heeg.de or try http://www.heeg.de/      |
+------------------------------------------------------+
