On Jan 31, 2015, at 10:13 AM, Benjamin (Inglor) Gruenbaum wrote:
> I think that people would generally will _expect_ `yield *` to be have like
> yield inside a loop. So most people would expect:
>
> ```
> yield* iterator
> ```
>
> To behave like:
>
> ```
> for(let val of iterator){
> yield val;
> }
>
> ```
>
> While I'm not (yet) suggesting that the behaviour should be similar in both
> cases this is definitely something to consider before deciding on throwing or
> suppressing.
They are similar, but the transparency requirement of yield* has priority It's
not a pure desugaring. For example, yield* passes throw the IteratorResu;lt
objects produced by the inner iterator. The above desugaring can't do that.
Allen
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss