j
: Next unread message k
: Previous unread message j a
: Jump to all threads
j l
: Jump to MailingList overview
Hi all.
Why am I not meant to make a deep copy of a class? From the source for TraitBehavior>>deepCopy (which in 3.9 is the method that is invoked when you invoke #deepCopy on a class):
deepCopy "Classes should only be shallowCopied or made anew." ^ self shallowCopy
Ditto applies for Class>>copy.
Surely, a shallow copy of a class is less useful than a deep copy because any modifications to the copy would also modify the original? Are there other reasons for copying a class other than to make a modifiable copy?
Gulik.
squeak-dev@lists.squeakfoundation.org