Tab Atkins Jr. (2013-05-13T18:15:38.000Z)
On Mon, May 13, 2013 at 11:08 AM, Andreas Rossberg <rossberg at google.com> wrote:
> The case I was talking about is simply this:
>
>   function* g() {
>     yield* [1, 2]
>   }
>
>   var o = g()
>   o.send(undefined)
>   o.send(5)  // what does this mean?
>
> But I suppose the answer is that the sent value is just dropped on the
> floor, as per the iterator expression interpretation you gave in the
> other post. Makes sense, I guess.

Yes, because that code is equivalent to:

function* g() {
  yield 1;
  yield 2;
}

Using .send() instead of .next() makes no difference to this code.
Using .throw() should just percolate the error up to the yield*
expression, as Allen suggested.

~TJ
github at esdiscuss.org (2013-07-12T02:27:21.454Z)
On Mon, May 13, 2013 at 11:08 AM, Andreas Rossberg <rossberg at google.com> wrote:
> The case I was talking about is simply this:
>
> ```js
> function* g() {
>   yield* [1, 2]
> }
>
> var o = g()
> o.send(undefined)
> o.send(5)  // what does this mean?
> ```
>
> But I suppose the answer is that the sent value is just dropped on the
> floor, as per the iterator expression interpretation you gave in the
> other post. Makes sense, I guess.

Yes, because that code is equivalent to:

```js
function* g() {
  yield 1;
  yield 2;
}
```

Using `.send()` instead of `.next()` makes no difference to this code.
Using `.throw()` should just percolate the error up to the `yield*`
expression, as Allen suggested.