excluding features from sloppy mode

Brendan Eich brendan at mozilla.com
Wed Dec 26 21:04:30 PST 2012


Brendan Eich wrote:
> So, case by case:
>
> * arrow function syntax (which does not imply "use strict" in body 
> prologue)
> * class
> * const
> * default parameters
> * destructuring
> * rest parameters
> * generators (function*, yield in function* body)
> * comprehensions
> * generator expressions
> * module 

I left out for-of loops that go with comprehensions and genexps like 
peas and carrots -- obviously for (x of o) is illegal in JS today, so 
there's no forward compatibility and the new for (x of o) body(); loop 
statement syntax again can be its own opt-in.

/be


More information about the es-discuss mailing list