It would be cool to merge #clone and #shallowCopy, and all the different #deepCopy* instances. Also the implementation of #deepCopy might need some cleanup, it seems to be rather complicated for such a trivial task of copying a object graph.
The implementation of #deepCopy seems to be pretty straightforward. I wonder how it could be simpler.
It doesn't handle recursion, which makes it pretty useless. I would suggest something like: deepCopy ^ self deepCopy: IdentityDictionary new deepCopy: anIdentityDictionary | copy | anIdentityDictionary at: self ifPresent: [ :value | ^ value ]. copy := anIdentityDictionary at: self put: self shallowCopy preDeepCopy. " copy all the variables of copy using 'var deepCopy: anIdentityDictionary' " ^ copy postDeepCopy -- Lukas Renggli http://www.lukas-renggli.ch