Mark S. Miller (2015-02-24T00:41:45.000Z)
Only that the proxy can detect each of the operations as a distinct trap,
and do something weird. A proxy that intend to emulate anything like a
normal object would choose not to, preserving by convention this
equivalence. It becomes a matter of informal unchecked contract
conformance, rather than a platform guarantee.



On Mon, Feb 23, 2015 at 4:28 PM, Isiah Meadows <isiahmeadows at gmail.com>
wrote:

>
> On Feb 23, 2015 3:31 PM, "Mark S. Miller" <erights at google.com> wrote:
> >
> >
> >
> > On Mon, Feb 23, 2015 at 11:59 AM, Isiah Meadows <isiahmeadows at gmail.com>
> wrote:
> >>
> >> On Feb 23, 2015 6:06 AM, "Andrea Giammarchi" <
> andrea.giammarchi at gmail.com> wrote:
> >>
> >> > On Sun, Feb 22, 2015 at 11:18 PM, Jordan Harband <ljharb at gmail.com>
> wrote:
> >
> > [...]
> >>
> >> >>  - We'd definitely want `Map.empty` and `Set.empty` assuming
> `Object.freeze` actually froze them
> >>
> >> Object.freeze does not freeze them, as far as I know. It might require
> method overrides.
> >
> > Object.freeze does not freeze their state. A proposal for a way to
> either freeze the state of collections, and/or to create frozen snapshots
> of collections, for future ES would be welcome and appreciated. I encourage
> any such effort to pay attention to Clojure and React.
> >
> >
> >>
> >> >>  - We'd probably want
> `Object.freeze(Object.seal(Object.preventExtensions(empty)))`, to be extra
> restrictive.
> >>
> >> Doesn't Object.freeze imply the other two? I thought it did.
> >
> >
> > It does. Given that all these methods of Object have their original
> value and that x is not a proxy
> >
> >     Object.freeze(Object.seal(Object.preventExtensions(x)))
> >
> > must be equivalent to
> >
> >     Object.freeze(x)
> >
>
> Pardon my ignorance, but in what cases does the proxy in this case differ?
> (although it's not entirely relevant in this particular case)
>
> >
> > --
> >     Cheers,
> >     --MarkM
>



-- 
    Cheers,
    --MarkM
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20150223/d674b9cf/attachment-0001.html>
d at domenic.me (2015-03-06T00:41:07.391Z)
Only that the proxy can detect each of the operations as a distinct trap,
and do something weird. A proxy that intend to emulate anything like a
normal object would choose not to, preserving by convention this
equivalence. It becomes a matter of informal unchecked contract
conformance, rather than a platform guarantee.