Smalltalk
›
Squeak
›
Squeak - Dev
Search
everywhere
only in this topic
Advanced Search
Behavior deepCopy smells
‹
Previous Topic
Next Topic
›
Classic
List
Threaded
♦
♦
Locked
1 message
Nicolas Cellier
Reply
|
Threaded
Open this post in threaded view
♦
♦
|
Behavior deepCopy smells
I think that Behavior>>deepCopy should either
^self
or
^self copy
but not
^self shallowCopy
because the methodDictionary should be copied not shared (plus
problems with shared subclasses, Metaclass soleInstance etc...).
I suggest ^self. OK ?
Nicolas
Free forum by Nabble
Edit this page