Andy Wingo (2014-06-06T13:02:37.000Z)
Hi,

A final point while I am thinking about it:

On Fri 06 Jun 2014 13:57, Andy Wingo <wingo at igalia.com> writes:

> 1: Essential differences
> ==
>
> Array comprehensions are eager.  Generator comprehensions are lazy.

This difference shows up here, for example:

  Q.async(function*(){
    return [for (x of y) yield x]
  })()

You can yield in the body of an ES6 array comprehension, but not in the
body of a generator comprehension.  This isn't something you can do with
an internal iterator design.

Andy
domenic at domenicdenicola.com (2014-06-12T22:35:07.403Z)
A final point while I am thinking about it:

On Fri 06 Jun 2014 13:57, Andy Wingo <wingo at igalia.com> writes:

> 1: Essential differences
> ==
>
> Array comprehensions are eager.  Generator comprehensions are lazy.

This difference shows up here, for example:

```js
  Q.async(function*(){
    return [for (x of y) yield x]
  })()
```

You can yield in the body of an ES6 array comprehension, but not in the
body of a generator comprehension.  This isn't something you can do with
an internal iterator design.