Comment on ES6 generators in depthparentComments−onestone11yWhy do you think the current syntax is more backwards-compatible? Vanilla ES5 parsers complain loudly when seeing "function *".−nkron11yIt's the other way around. ES6 needs to support loading ES5 content. They can't make 'generator' a keyword because it was a perfectly fine variable name in ES5.−onestone11yYou are right. My bad.−tlrobinson11yThat would be considered "forward-compatible".
Comments
Why do you think the current syntax is more backwards-compatible? Vanilla ES5 parsers complain loudly when seeing "function *".
It's the other way around. ES6 needs to support loading ES5 content. They can't make 'generator' a keyword because it was a perfectly fine variable name in ES5.
You are right. My bad.
That would be considered "forward-compatible".