Kevin Smith wrote:


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


Ah, thanks for pointing out the function-head issue. So for non-strict regular functions, is yield allowed in parameter initializers or not?

Sure -- yield is just an identifier there.

This makes for wtfjs additions, but they all seem non-wtf on reflection (or did to us when Waldemar threw them up on a whiteboard last week). By non-wtf, I mean anyone who groks that yield is reserved only in function* can work them out.

The star after function really helps. ES5's "use strict" directive prologue in the body applying to its left (even in ES5 -- duplicate formals are a strict error) is goofy.

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

Reply via email to