I think it should keep it. Douglas did something to allow cyclic
references ( https://github.com/douglascrockford/JSON-js/blob/master/cycle.js
) and he probably wouldn't have done that if it had no use. Plus
you're talking of cloning data structures and a graph is one.

And if you do not allow cyclic references, you still have to do
something about it. Ignoring the properties will probably make devs
wonder why this property isn't cloned and throwing an error is, IMHO,
no the kind of behavior you want.

On Sun, Jan 29, 2012 at 9:56 PM, Peter van der Zee <e...@qfox.nl> wrote:
> On Sun, Jan 29, 2012 at 7:50 PM, Xavier MONTILLET
> <xavierm02....@gmail.com> wrote:
>> With your last two implementations, you don't keep cyclic references.
>
> I did not intend to. In fact, my intention was to have a "clean"
> object with just structure (objects and arrays) and primitives.
> Nothing else, especially nothing invisible (like references, object
> instances or attributes). You can save that fancy stuff for
> Object.clone :)
>
> - peter
_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to