Newsgroups: comp.lang.smalltalk
Path: cantaloupe.srv.cs.cmu.edu!das-news2.harvard.edu!news4.ner.bbnplanet.net!news.ner.bbnplanet.net!news.mathworks.com!newsfeed.internetmci.com!gatech!sdd.hp.com!hp-pcd!hplabs!hplextra!hplb!scrl
From: scrl@hplb.hpl.hp.com (Simon Lewis)
Subject: Re: Lewis Book Question
Sender: news@hplb.hpl.hp.com (Usenet News Administrator)
Message-ID: <DpDnxH.L6p@hplb.hpl.hp.com>
Date: Fri, 5 Apr 1996 07:10:29 GMT
References: <4k0sh1$86a@newsgate.sps.mot.com>
Nntp-Posting-Host: mcgrew.hpl.hp.com
Organization: Hewlett Packard Laboratories, Bristol, UK.
X-Newsreader: TIN [version 1.2 PL0.7]
Lines: 31

Bill Bitner (wjbitner@mos8synapse.sps.mot.com) wrote:

> I've been reading the Simon Lewis book "The Art and Science
> of SMALLTALK".  I've found it a very good OO reference.

Thank you, I'm glad you enjoyed the book.

> I haven't done too much programming in SmallTalk itself
> but have plenty of OO experience.  On page 60, Lewis writes
> "However, deepCopy was found to be a fundamentally flawed
> concept, so now on shallowCopy is supported".  Unfortunately,
> he doesn't explain why he believes deepCopy to be flawed.
> Could some one fill me in??

Well, if you don't mind me replying... ;-)  deepCopy was thought by
ParcPlace to be flawed because it essentially opens up the possibility
of copying the entire system, since it just goes on and on copying
the contents of the instance variables of the object being copied, then
the contents of the instance variables of the objects it so copied, and
so on.  There's even the possibility of a circularity, meaning that
the operation will never terminate.  Not something that's desirable
under most circumstances.

Simon.

http://www-uk.hpl.hp.com/people/scrl/ArtAndScience/home.html

                ----------------------------------------- 
                 Simon C R Lewis -> scrl@hplb.hpl.hp.com
                 Hewlett-Packard Laboratories Bristol UK
                ----------------------------------------- 
