Re: Cloning in D

2010-09-07 Thread Jacob Carlborg
On 2010-09-07 04:16, Michel Fortin wrote: On 2010-09-06 20:55:16 -0400, dsimcha said: == Quote from Michel Fortin (michel.for...@michelf.com)'s article I'm under the impression that a too permissive generic implementation of cloning is going to break things in various scenarios. In general

Re: Cloning in D

2010-09-06 Thread Michel Fortin
On 2010-09-06 20:55:16 -0400, dsimcha said: == Quote from Michel Fortin (michel.for...@michelf.com)'s article I'm under the impression that a too permissive generic implementation of cloning is going to break things in various scenarios. In general you raise some very good issues, but IMHO t

Re: Cloning in D

2010-09-06 Thread dsimcha
== Quote from Michel Fortin (michel.for...@michelf.com)'s article > I'm under the impression that a too permissive generic implementation > of cloning is going to break things in various scenarios. In general you raise some very good issues, but IMHO the right way to do cloning is to have permissi

Re: Cloning in D

2010-09-06 Thread Michel Fortin
On 2010-09-06 17:00:26 -0400, Andrei Alexandrescu said: On 09/06/2010 02:56 PM, BLS wrote: On 06/09/2010 05:15, dsimcha wrote: I've started playing around with Orange a little to see whether it would meet D's cloning needs. Clone respective member-wise clone ( I prefer copy and deep copy)

Re: Cloning in D

2010-09-06 Thread Andrei Alexandrescu
On 09/06/2010 02:56 PM, BLS wrote: On 06/09/2010 05:15, dsimcha wrote: I've started playing around with Orange a little to see whether it would meet D's cloning needs. Clone respective member-wise clone ( I prefer copy and deep copy) should be part of object. no std._tricks period. Though th

Re: Cloning in D

2010-09-06 Thread BLS
On 06/09/2010 05:15, dsimcha wrote: I've started playing around with Orange a little to see whether it would meet D's cloning needs. Clone respective member-wise clone ( I prefer copy and deep copy) should be part of object. no std._tricks period.

Re: Cloning in D

2010-09-06 Thread Jacob Carlborg
On 2010-09-06 16:01, dsimcha wrote: == Quote from Jacob Carlborg (d...@me.com)'s article I've looked at this problem now but I don't know I can detect the aliasing. Suggestions ? Well, here's what I was thinking of doing when I was thinking of rolling my own: Traverse the object graph once.

Re: Cloning in D

2010-09-06 Thread Jacob Carlborg
On 2010-09-06 16:12, Andrei Alexandrescu wrote: On 09/05/2010 10:15 PM, dsimcha wrote: I've started playing around with Orange a little to see whether it would meet D's cloning needs. IMHO one must-have feature for proper cloning that truly "just works" is full aliasing preservation. What do y

Re: Cloning in D

2010-09-06 Thread dsimcha
== Quote from Andrei Alexandrescu (seewebsiteforem...@erdani.org)'s article > On 09/05/2010 10:15 PM, dsimcha wrote: > > I've started playing around with Orange a little to see whether it would > > meet > > D's cloning needs. IMHO one must-have feature for proper cloning that truly > > "just work

Re: Cloning in D

2010-09-06 Thread Andrei Alexandrescu
On 09/05/2010 10:15 PM, dsimcha wrote: I've started playing around with Orange a little to see whether it would meet D's cloning needs. IMHO one must-have feature for proper cloning that truly "just works" is full aliasing preservation. What do you mean by aliasing preservation? I'd think you

Re: Cloning in D

2010-09-06 Thread dsimcha
== Quote from Jacob Carlborg (d...@me.com)'s article > I've looked at this problem now but I don't know I can detect the > aliasing. Suggestions ? Well, here's what I was thinking of doing when I was thinking of rolling my own: Traverse the object graph once. Create some data structure of all po

Re: Cloning in D

2010-09-06 Thread Jacob Carlborg
On 2010-09-06 10:44, Jacob Carlborg wrote: On 2010-09-06 05:15, dsimcha wrote: I've started playing around with Orange a little to see whether it would meet D's cloning needs. IMHO one must-have feature for proper cloning that truly "just works" is full aliasing preservation. For example, the fo

Re: Cloning in D

2010-09-06 Thread Jacob Carlborg
On 2010-09-06 05:15, dsimcha wrote: I've started playing around with Orange a little to see whether it would meet D's cloning needs. IMHO one must-have feature for proper cloning that truly "just works" is full aliasing preservation. For example, the following code modified slightly from the Or

Cloning in D

2010-09-05 Thread dsimcha
I've started playing around with Orange a little to see whether it would meet D's cloning needs. IMHO one must-have feature for proper cloning that truly "just works" is full aliasing preservation. For example, the following code modified slightly from the Orange example doesn't work properly: i