Kevin Smith wrote:


    I think you'reright.  The fact that `yield` is reserved in ES5
    strict mode is only relevant for non-generator functions.  We
    could (now, but not latter) reserve another identifier
    contextually within generator functions.  We just did something
    similar with `await` within modules.


So just hypothetically speaking, what would be a good choice for reserved word? I had `input`, but that seems like a too-common identifier.

I think you're rushing things a bit. We don't necessarily want a single name reserved in context. Perhaps there's a better way that doesn't abuse yield or add an unwanted degree of freedom (or three -- don't want to get last yielded-value, that is a GC-leak honey trap; don't want yield-that-must-come-first-temporally-and-be-seen-by-code-reviewers either :-P).

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

Reply via email to