>
> The idea here is that methods do not belong in data structures (clone
>> should be to efficiently clone data).
>>
>
> This is already too much "unfortunate" restriction.
>
> What about calculated "get" properties:
>
> > var o = {
> ... get foo() {
> ... return "foo";
> ... }
> ... },
> ... clone = JSON.parse(JSON.stringify(o));
>
> > clone
> { foo: 'foo' }
>
I don't know what the sensible choice here is. Could be either way.
Your right, restrictions are annoying.
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss