On 11/25/2013 02:03 PM, Kevin Smith wrote:
Apologies for this remedial question, but I find the new grammar parameterized 
around [Yield] to be confusing.  If I understand correctly, this is to allow 
yield within non-strict generators.  If that's correct, then why are non-strict 
generators a good idea?

Thanks!

It's easier to grammatically distinguish between being inside and outside a 
generator than it is to distinguish strict vs. non-strict.

To tell whether you're a strict function or not you need to lex the input.  To 
lex you need to parse it.  To parse it you need to figure out how to parse 
yield.  Hence you get an obnoxious circularity.

Think of cases such as the following non-strict code snippet:

function(a = yield+b) {
  "use strict";
}

    Waldemar

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

Reply via email to