On Nov 26, 2013, at 11:36 AM, Brendan Eich wrote: > Kevin Smith wrote: >> Yes, I see that now. Has anyone done compatibility-hazard analysis for this >> breaking change? >> >> ; >> let["a"].foo() // Fine in ES5 non-strict, fails in ES6? > > That old chestnut! (Unquote "a" for better ambiguity.) > > http://esdiscuss.org/topic/let-and-strict-mode > > I honestly forget how we decided to go for let at start of statement followed > by [ -- but I do recall we agreed not to have name-binding-sensitive > parsing(!). I.e., we would not look for 'var let = ...' and treat 'let' in > that (hoisted) scope as a non-keyword.
http://people.mozilla.org/~jorendorff/es6-draft.html#sec-expression-statement let [... is not an ExpressionStatement. I requires two token look-ahead for this one special case. Allen
_______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

