Comprehensions, Where Art Thou?

Kevin Smith zenparsing at gmail.com
Mon Aug 11 06:03:02 PDT 2014


I still don't quite understand the motivation for removing comprehensions
from ES6.  They are a well-loved feature of Python and I have every reason
to believe that they would be well-liked in Javascript.  For simplicity, we
could certainly leave off array comprehensions, while keeping generator
comprehensions, since you can build a list from a comprehension using
spread syntax:

    var list = [...(for x of iterable if somePredicate(x)];

Can someone explain more clearly the motivation for removing this feature?

Thanks,
Kevin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20140811/21d84024/attachment.html>


More information about the es-discuss mailing list