Andy Wingo (2014-08-21T07:04:22.000Z)
On Wed 20 Aug 2014 19:55, Brendan Eich <brendan at mozilla.org> writes:

> Kevin Smith wrote:
>>     function *echo() input {
>>         while (true) yield input.value;
>>     }
>
> So input is bound to the next() actual parameter value on each
> resumption. That's not bad shed-coloring!
>
> Andy, Dave: WDYT?

I think changing things right now is the wrong thing to do.  Since this
is a compatible extension, we don't have to think about this for ES6.
Just putting that out there ;)

That said, first thoughts:

  * I assume "input" could then be captured by nested scopes.  This
    would be a bit strange but could work.

  * Really you'd want to be able to destructure too, as you can in every
    other part of the grammar that introduces names.  That's probably
    not a great thing to do here, though.

  * I assume Kevin meant:

      function *echo input { while (true) yield input }

To me it smells, but perhaps that is just my grumpiness ;)

Explicitly being able to place the initial yield would be nicer, but
then it's more difficult to ensure that the initial yield comes before
other yields.

I say punt ;)

Andy
domenic at domenicdenicola.com (2014-08-26T18:24:40.905Z)
I think changing things right now is the wrong thing to do.  Since this
is a compatible extension, we don't have to think about this for ES6.
Just putting that out there ;)

That said, first thoughts:

  * I assume "input" could then be captured by nested scopes.  This
    would be a bit strange but could work.

  * Really you'd want to be able to destructure too, as you can in every
    other part of the grammar that introduces names.  That's probably
    not a great thing to do here, though.

  * I assume Kevin meant:

    ```js
    function *echo input { while (true) yield input }
    ```

To me it smells, but perhaps that is just my grumpiness ;)

Explicitly being able to place the initial yield would be nicer, but
then it's more difficult to ensure that the initial yield comes before
other yields.

I say punt ;)