destructuring: as patterns?

Irakli Gozalishvili rfobic at gmail.com
Wed Apr 18 10:09:58 PDT 2012



On Wednesday, 2012-04-18 at 09:32 , Brendan Eich wrote:

> Irakli Gozalishvili wrote:
> > OMG, you're right!!! I could swear it did not worked before as I had 
> > unsuccessful attempts to use that form. I guess it's ok if Brendan did 
> > not knew it either :D
> > 
> 
> 
> I never said I didn't know, I said ES6 new syntax opts into strict mode 
> for things like banning duplicate property names in object literals, so 
> this might well apply to duplicate property names in object patterns.
> 
> 


I'm sorry for inappropriate comment.
 
> I 
> still think this may be the case.
> 
> ES4-era destructuring was very shallow sugar:
> 
> var {x: y} = z; => var y = z.x;
> 
> and so on -- with a temporary to avoid evaluating z more than once, and 
> z is evaluated first (a left-to-right evaluation order break, but others 
> exist, e.g. for-in loop head evaluation order).
> 
> /be 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20120418/4525a92d/attachment-0001.html>


More information about the es-discuss mailing list