fail-fast object destructuring (don't add more slop to sloppy mode)

Kevin Smith khs4473 at gmail.com
Sun Jan 6 04:14:25 PST 2013


>
> Would we?  This is something a little different than "irrefutable property
> get".  Thinking...
>
>
Notice that, strictly speaking, we don't need an "irrefutable object"
operation:

    let v = ?o.p;

    // is equivalent to:
    let v = {o}.?o.p;

The allocation in "{o}" can be statically optimized away.

The same goes for the pattern language:

    let ?{ p: v } = o;

    // is equivalent to:
    let { ?o: { p: v } } = {o};

{ Kevin }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20130106/de4a8484/attachment.html>


More information about the es-discuss mailing list