> 'yield' is already disallowed in generator function default initializer
> expressions (although I was reviewing the latest spec. revision yesterday
> and there may still be still bugs I have to fix in that regard).
>
> The reason it isn't allowed is that the generator object is not yet
> instantiated and active at the point where a default value initializer
> would be evaluated. (note you yield from a invocation on the generator
> object, not the generator function that creates a generator object) .
>
>
Yes, 'yield' the operator is disallowed in parameter default expressions.
 But what about 'yield' the identifier?  My current reading of the spec is
that it _is_ allowed, but I could be misreading.  It seems more natural to
me to disallow 'yield' the identifier in the whole generator (formal
parameters and body, both).
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to