destructuring: as patterns?

Brendan Eich brendan at mozilla.org
Wed Apr 18 11:42:53 PDT 2012


Allen Wirfs-Brock wrote:
> False alarm! Actually the above isn't correct.  The current spec draft 
> actually does allow
>    let {b,b:{x,y}};

Nice -- is this sufficient to avoid 'as'?

For array patterns we would need to allow property assignments in array 
literals:

   let [b, 0:{x,y}];

This was proposed at one point, IIRC, but a while ago.

/be


More information about the es-discuss mailing list