ES6 doesn't need opt-in
Mark S. Miller
erights at google.com
Wed Jan 4 15:35:17 PST 2012
On Wed, Jan 4, 2012 at 12:16 PM, Brendan Eich <brendan at mozilla.com> wrote:
> And for classes.
"class" is unconditionally reserved, so there's no issue.
> And for generators?
I like the idea of generators as yet another strict opt-in, even though
recognizing "function*" is technically an example of the "previously-illegal
token sequence" approach. It does feel like an example of
it readability wise. The eye rapidly learns to see "function*" as a
keyword. The extra grammar complexity to recognize it is minimal.
> If yes for generators, then why not for comprehensions, rest/spread,
> destructuring (separate from the 'let' issue), for/of, and other new forms?
I hadn't thought about comprehensions. As for rest/spread and
destructuring, sure, if there's no complexity. However, Allen just pointed
out that there would be complexity for allowing non-strict destructuring,
so let's not. If we run across problems with the others, then probably not
for those either. We've got enough important things to do that we shouldn't
waste any time enhancing non-strict mode when doing so is non-trivial.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the es-discuss