On Sat, Sep 22, 2012 at 11:21 AM, Brendan Eich <[email protected]> wrote: > Perhaps the thing to do is keep to Python: for+ if? if you get my > pidgin-EBNF.
But that isn't Python's syntax. Python's comprehensions are: for (for|if)* Haskell's comprehensions are: (for|if|let)* This is what I would prefer for JS. Clojure's comprehensions are: for+ (if|while|let)* Clojure puts the expression at the right, which I like, for the reasons Allen mentioned. CoffeeScript's comprehensions are: for when? Only a single 'for' clause. It can't be used to flatten an array of arrays. I actually kind of like Allen's argument about not wanting to encourage the use of array comprehensions for complicated use cases. However I'm not sure how that squares with a distaste for nanny syntax restrictions! :) -j _______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

