The process of adding new compiler macros to the current Parenscript to support Javascript 2.0 is very easy. See the example later in the email. However, the tricky design issue is how to disallow Javascript 2.0
generation when you only want ECMAScript 2 syntax. As the compiler
becomes more sophisticated, this option flag may have more
ramifications (because of semantic analysis). I do not foresee any grave problems, however, and am in favor of adding support for Javascript 2 so long as it can be disabled.
...
The point is, ECMAScript 4 has a variety of new features (optional static
typing, classes, interfaces, packages, generators, list comprehensions etc. -
there's a nice overview at [3]) which aren't currently supported by ParenScript.
Given that the adoption of ECMAScript 4/JavaScript 2 is a case of when rather
than if [4], it would be great if any overhaul of ParenScript could be done with
an eye to incorporating some or all of these features in the near future
(hopefully by other interested parties such as myself).
The "add a compiler" POV vs. the "keep it simple" perspective echoes the two
sides of the JavaScript 2 debate. Since these new language features will be
added (and I'm already using them in ActionScript 3), it would be great if they
could be added to ParenScript without causing too much inconvenience to those
who like it the way it is now.
I would like to help out with this task; I might have some time to spend on it
later in the year.
Cheers,
John :^P
[3] http://developer.mozilla.org/presentations/xtech2006/javascript/
[4] http://www.mozilla.org/projects/tamarin/