Re: A reprieve for ES6 comprehensions

2014-06-10 Thread Andy Wingo
On Sat 07 Jun 2014 21:28, "Tab Atkins Jr." writes: > do you also disagree with Python's high similarity between array > comprehensions and generator comprehensions? It seems that we have lost context on both sides, both in David's slides and in my note ;) One of David's thoughts was that somehow

Re: A reprieve for ES6 comprehensions

2014-06-09 Thread Tab Atkins Jr.
On Sat, Jun 7, 2014 at 3:41 PM, Brendan Eich wrote: > Tab Atkins Jr. wrote: >> >> On Fri, Jun 6, 2014 at 1:57 PM, Andy Wingo wrote: >>> >>> > 1: Essential differences >>> > == >>> > >>> > Array comprehensions are eager. Generator comprehensions are lazy. >>> > Array comprehensions desugar in

Re: A reprieve for ES6 comprehensions

2014-06-07 Thread Brendan Eich
Tab Atkins Jr. wrote: On Fri, Jun 6, 2014 at 1:57 PM, Andy Wingo wrote: > 1: Essential differences > == > > Array comprehensions are eager. Generator comprehensions are lazy. > Array comprehensions desugar into a do expression à la ES7. Generator > comprehensions desugar into an IIGFE (i

Re: A reprieve for ES6 comprehensions

2014-06-07 Thread Tab Atkins Jr.
On Fri, Jun 6, 2014 at 1:57 PM, Andy Wingo wrote: > 1: Essential differences > == > > Array comprehensions are eager. Generator comprehensions are lazy. > Array comprehensions desugar into a do expression à la ES7. Generator > comprehensions desugar into an IIGFE (immediately-invoked generator >

Re: A reprieve for ES6 comprehensions

2014-06-06 Thread C. Scott Ananian
On Fri, Jun 6, 2014 at 7:57 AM, Andy Wingo wrote: > Comprehensions match ES6 very well as it is, without considering the > possible addition of parallelism. They even match up well if we add the > other dimension of asynchronous comprehensions -- i.e. [for x of await y > z], (for x of await y z).

Re: A reprieve for ES6 comprehensions

2014-06-06 Thread Andy Wingo
Hi, A final point while I am thinking about it: On Fri 06 Jun 2014 13:57, Andy Wingo 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) yiel

A reprieve for ES6 comprehensions

2014-06-06 Thread Andy Wingo
Hi, dherman has argued that comprehensions should be removed from the ES6 draft: https://speakerdeck.com/dherman/a-better-future-for-comprehensions The argument is that the existing comprehension mechanism is incompatible with future extensions, notably parallelism. I am not sure I buy this a