On Sun, Mar 30, 2008 at 7:29 PM, Jeff Dyer <[EMAIL PROTECTED]> wrote:
> I've updated the ES4 grammar files linked from
> http://wiki.ecmascript.org/doku.php?id=proposals:normative_grammar
Thanks for doing this. I noticed that the grammar doesn't allow this:
[addr
for each (user in users)
if (user.isAdministrator)
for each (addr in user.addresses)]
Is this intentional? Both Python and Haskell allow the analogous
listcomp. (Oddly enough, if you anti-optimize this, moving the
IfCondition to be after the last ForInExpression, the proposed ES4
grammar accepts that.)
Separately, I would appreciate let clauses in ArrayComprehensions:
[[trial, phi]
for each (trial in trials)
let (phi = hugeExpensiveCalculation(trial))
if (phi < 1000)]
Haskell has this feature. I occasionally reach for it in Python and
it isn't there.
-j
_______________________________________________
Es4-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es4-discuss