[Fwd: Fail-fast on non-existing [[Get]]]

Tom Van Cutsem tomvc.be at gmail.com
Wed Oct 17 11:39:32 PDT 2012

2012/10/16 Herby Vojčík <herby at mailbox.sk>

> I see two solutions:
>   - add something to the freeze, seal, preventExtensions family which
> would set an object to the fail-fast [[Get]] state.
>   - use a Proxy in the proto chain to trap the unknown [[Get]] and
> throw early
> Do you think this needs a solution at all? If yes, which option would
> you favour?

The second option is easy to accomplish but pretty invasive since it
requires you to inherit from a particular object. If you have an
abstraction that already inherits from something else, you're hosed.

Personally, I'm not convinced this is a big enough problem to warrant
another "mode" for Javascript objects.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20121017/e02da209/attachment.html>

More information about the es-discuss mailing list