arrow syntax unnecessary and the idea that "function" is too long

Kam Kasravi kamkasravi at
Fri May 20 14:34:06 PDT 2011

Thanks Claus for the synopsis and pointing out the 404. ometa is the last paper:,
which is a javascript packrat parser. Tom and Mark are very familiar with this work I believe.
There are some great examples of javascript monads or monad-like frameworks - for example jquery ...

It's unfortunate the harmony grammar cannot take advantage of these more recent advances in parsing,
however I understand Brendan's point about accommodating the major implementors.
Any transpiler could certainly go this route.

From: Claus Reinke <claus.reinke at>
To: Kam Kasravi <kamkasravi at>; Brendan Eich <brendan at>
Cc: es-discuss <es-discuss at>
Sent: Friday, May 20, 2011 2:11 PM
Subject: Re: arrow syntax unnecessary and the idea that "function" is too long

For a presumed-done area, there has been a lot of activity
in parser research recently, partially fueled by IDEs and DSLs
(model-driven development with good generated tool support).

For grammar spec purposes, it might be interesting to look at self-applications of these techniques (IDEs for parser development, with support for grammar analysis and debugging). I keep meaning to look at ANTLRWorks: 
   The ANTLR GUI Development Environment

Anyway, the titles for two of those three urls, for those who
don't have time to look right now:


   Better Extensibility through Modular Syntax
   Robert Grimm


   Monadic Parsing using JavaScript
   Axel T. Schreiner

Independent of parsing, I recommend that readers of this
thread scroll down to the interpreter (search for 'eval'). It
gives an example of how an essential programming pattern
(monads) is technically supported in Javascript, but mostly
useless due to syntactic overhead: instead of bringing out
the essential aspects, they get burried in syntax (and if one
tries to shunt the 'return's out of the way, ASI says hello).

Javascript coders, when faced with this issue, tend to split
into two groups: one that abandons the variable binding functionality of monads and makes due with libraries, and
one that writes preprocessors (the author here, also
streamline.js and Jscex as just two recent examples from the nodejs list). 
Just as a further example for those still unconvinced by
the case for better function syntax: it isn't sufficient, but
it is necessary!-)


404 for me?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list