Comprehensions, Where Art Thou?

Brendan Eich brendan at mozilla.org
Mon Aug 11 11:17:39 PDT 2014


Kevin Smith wrote:
> That sounds good (although I haven't thought it through), but is that 
> plan incompatible with comprehensions as a syntactic convenience?

Which comprehensions? Array comps, no, but see my next mail about the 
generalized from 1 to N point, no pmap/mappar, etc.

Generator expressions AKA generator comprehensions are less 
well-motivated, even though laziness is absolutely required for (e.g.) 
Norvig's Sudoku solver not to diverge. The use of () -- already an 
overloaded delimiter pair -- and the 1 vs. N problem bite harder there.

Sure, we could have array comprehensions and the more general LINQ-style 
syntax+protocols together. But it's plausible based on Dave's gists that 
we won't need much or any syntax, and TC39 isn't willing to call that 
right now given how ES6 has slipped. So "defer" or "cut" (what's the 
diff? Main thing is to get to rapid-er release and ES7/8/etc. or 
"annuals") won.

/be


More information about the es-discuss mailing list