Stéphane Ducasse wrote:
> 
> 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:
> 
>>> - #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.
>> 
> 
> 
> 

see discussion for
http://code.google.com/p/pharo/issues/detail?id=521. The behaviors are
different.

So #deepCopy perhaps should go, but it is not safe to assume that #deepCopy
can just be replaced with #veryDeepCopy
Stan



-- 
View this message in context: 
http://n2.nabble.com/clone-vs-shallowCopy-tp4290815p4293752.html
Sent from the Pharo Smalltalk mailing list archive at Nabble.com.

_______________________________________________
Pharo-project mailing list
[email protected]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

Reply via email to