Allen Wirfs-Brock (2013-09-06T18:48:05.000Z)
domenic at domenicdenicola.com (2013-09-18T18:53:25.631Z)
On Sep 6, 2013, at 11:18 AM, Brendan Eich wrote: > There would be no explicit `yield` in the second example, though. (`yield` is an error in any arrow body.) why no `yield`? Note that I wrote a { } body for the generator arrow function body, rather than an expression body and that generator functions use explicit |yield| in their bodies. Also, if the expression body form had an implicit `yield` in front of the expression (eg, `c *=> 42`, implicitly yields `42`) then then there would be confusion between ```js c => (for (p of c) if (p in this) this[p]) //function that returns a generator that yields this[p] c *=> (for (p of c) if (p in this) this[p]) //function that returns a generator that yields a generator ``` The first form would almost always be what somebody would want. > I'm not seriously advocating generator arrow function syntax, mind you! Yup, I think we're better off without them.