2010/1/12 Stéphane Ducasse <[email protected]>: > http://code.google.com/p/pharo/issues/list?thanks=1789 > > I do not understand why we need deepCopy and why deepCopy does not implement > the veryDeepCopy semantics? > > On Jan 12, 2010, at 1:41 PM, Levente Uzonyi wrote: >
IMO it's the historical st80 deepCopy. Nicolas >>> - #copy is the normal copy operation. It should be used by default and >>> never overridden. It calls #postCopy that can be overridden to have >>> class specific copy semantics. >>> >>> - #shallowCopy does a shallow copy. It should never be overridden and >>> only be used if you want to get these very specific semantics. >>> >>> - #deepCopy does a deep copy. It should never be overridden and only >>> be used if you want to get these very specific semantics. >> >> It doesn't handle cycles, #veryDeepCopy does. >> >>> >>> - #clone comes from eToys and Morphic (AFAIK). It implements some >>> other copy semantics than #copy. I don't think that anybody should >>> call this method, other than code that depends on this particular copy >>> behavior. >>> >> >> From Morphic. >> >> >> Levente >> >>> This is exactly the same problematic as with #=. There can't be just >>> one #=. Other clients might consider other things when comparing >>> objects. > > > _______________________________________________ > Pharo-project mailing list > [email protected] > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project > _______________________________________________ Pharo-project mailing list [email protected] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
