Overriding Object#clone vs. Overriding Object#dup for Deep-Cloning

2012-09-19 Thread Yaser Sulaiman
Hi. Is there a community convention that specifies which of the two methods, `Object#clone` and `Object#dup`, should be overridden for the purposes of deep-cloning? On Stackoverflow, some say that `clone` should be overridden [1], while others say that `dup` is the method to be overridden [2]. So

Re: Overriding Object#clone vs. Overriding Object#dup for Deep-Cloning

2012-09-18 Thread Robert Klemme
On Tue, Sep 18, 2012 at 9:20 PM, Yaser Sulaiman wrote: > Hi. > > Is there a community convention that specifies which of the two methods, > `Object#clone` and `Object#dup`, should be overridden for the purposes of > deep-cloning? > > On Stackoverflow, some say that `clone` should be overridden [1]