Array Comprehensions

David Bruant bruant.d at
Tue Feb 7 13:28:17 UTC 2017

Le 06/02/2017 à 17:59, Ryan Birmingham a écrit :
> Hello all,
> I frequently find myself desiring a short array or generator 
> comprehension syntax. I'm aware that there are functional ways around 
> use of comprehension syntax, but I personally (at least) love the 
> syntax in the ES reference 
> (
> The best previous discussion on this that I found was six years old 
> ( and 
> answers some of my questions, raising others. That said, I wanted to ask:
>   * Why is the Comprehension Syntax in the reference yet not more
>     standard? It feels almost like a tease.
Proposals to change the standard are listed here :
The process for a feature to become standard is described here :

>   * How do you usually approach or avoid this issue?
>   * Do you think we should look at improving and standardizing the
>     comprehension syntax?
Some might argue it is yet another instance of "superficial sugar 
obsession" [1] :-p I don't know where I stand personally.

In any case, if you want to start, write down a proposal (can be 20 
lines in a gist [2]) including programs that are hard to express in 
JavaScript and which readability would significantly be improved with 
the new syntax.
Perhaps submit it to the mailing-list and try to find a "TC39 champion" 
(criterion to enter stage 1).
At the very least, the proposal will be listed in the stage 0 proposals 
list [3].


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list