Hi, at the beginning, it is a simply question, not a suggest of features. And have a answer to my question, why we keep that, for performance? In this case when perform a #deepCopy how ensure, in the system we don't have cycle between self and instance var (recursively)? the behavior of #deepCopy is it really relevant (not the name) ? Then, I don't suggest to rename #deepCopy, i suggest to replace the behavior of #deepCopy by #veryDeepCopy behavior. Finally i just want to understand the reason, why we keep that? If we keep, it certainly for good reason, which? I just want to have a better understanding of the system. PS: I ask this question because i search about issue 521. And #deepCopy create infinite loop because there are a cycle. On Oct 21, 2009, at 1:26 AM, Schwab,Wilhelm K wrote:
I'm going to briefly be a wise-guy to a (well intentioned) purpose. You appear to be suggesting that we call #deepCopy something else, and then fix it.
One might drag the fix into #deepCopy?? But years ago now, #deepCopy fell from grace, perhaps for good reason. What I recall seeing in its place was #postCopy that can be overriden to ensure a distinct copy; that seemed to be in contrast to #shallowCopy.
This deserves some attention to ensure that we do the correct thing.
Bill
-----Original Message----- From: pharo-project-bounces@lists.gforge.inria.fr [mailto:pharo- project-bounces@lists.gforge.inria.fr] On Behalf Of arnaud Jean Baptiste Sent: Tuesday, October 20, 2009 10:07 AM To: Pharo Development Subject: [Pharo-project] Question about deepCopy,
question:
deepCopy have this behavior : - copy self. - then send deepCopy on all instance var.
this behavior, make infinite loop when a object have instance variable which reference to himself or more longer cycle.
Why don't replace deepCopy by veryDeepCopy, same behavior but copy each object only once (create collection and keep reference). performance issue ?
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project