2011/5/29 Dmitry A. Soshnikov <dmitry.soshni...@gmail.com>

That's it, exactly. We always looking for a shorter sugar. Though, the main
> thing that the sugar shouldn't be cryptic at the same time. Probably
> Erlang's list comprehensions are cryptic for someone, but again, taking into
> account arrow-functions, seems arrow-comprehensions aren't so cryptic.
>

I think that your proposal based in Haskell's syntax is natural,clear and
easy for the user. A EBNF grammar for it:

ListComprehension :  '[' Expression '|'  IterableOrFilter
(,IterableOrFilter)+ ']'
IterableOrFilter:          Id '<-' ArrayOrGenerator | BooleanFilter

The problem is the LL(1) conflict with Array Literal, but that doesn't
matter much, right?  ;)

Jose.
_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to