Allen Wirfs-Brock (2013-09-06T17:02:08.000Z)
On Sep 6, 2013, at 9:06 AM, Brendan Eich wrote:

>> Domenic Denicola <mailto:domenic at domenicdenicola.com>
>> ...
> 
>> Why not just make them sugar for creating custom iterable-iterators without shallow coroutine capabilities?
> 
> Because we need the shallow continuation to hold the implicitly declared let bindings induced by the for heads.

And we need to handle 'this' binding appropriately. 

(for (x of [1,2, 3])  this[x])

can not desugar into

(function*() { for (let x of [1,2, 3])  yield this[x]; })()

because the 'this' binding would be wrong.

Allen
domenic at domenicdenicola.com (2013-09-18T18:50:37.265Z)
On Sep 6, 2013, at 9:06 AM, Brendan Eich wrote:

> Domenic Denicola <mailto:domenic at domenicdenicola.com>
>
>> Why not just make them sugar for creating custom iterable-iterators without shallow coroutine capabilities?
> 
> Because we need the shallow continuation to hold the implicitly declared let bindings induced by the for heads.

And we need to handle `this` binding appropriately. 

```js
(for (x of [1,2, 3])  this[x])
```

can not desugar into

```js
(function*() { for (let x of [1,2, 3])  yield this[x]; })()
```

because the `this` binding would be wrong.