On Mon, Mar 3, 2014 at 6:44 PM, joe <[email protected]> wrote:

> Is the function* syntax for generators final?
>

Yes


> I'm curious what the justification for it is,
>

The yield keyword was previously only reserved in strict mode (ES5
7.6.1.2), which means it's perfectly valid JS to have: function f() { var
yield = 1; return yield; } in non-strict mode code. In order to allow
generator functions in both strict and non-strict code, where yield is a
keyword, a new syntactic form was needed, ie. the star (generator)
function. This avoids potentially breaking any existing code that is using
yield as an identifier.


> but mostly I just need to know if it's likely to change.
>

I'm confident that it will not change.

Rick
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to