2009/12/15 Arjun Guha <
arjun...@gmail.com>:
> It would be nice if we could write the Flapjax compiler as a DSL in
> JavaScript. That would eliminate the external compilation step.
> However, I don't think this would help.
>
> The Flapjax compiler performs rewrites on JavaScript abstract syntax.
> It does not do string manipulation, which is what this proposal is
> about. I suppose it could manipulate strings of source-code and
> eval---but we are not going to admit eval.
This proposal uses content generation (the actual result is
string-like, not a string) as a motivating example but I think it is
more widely applicable.
There are separate discussions about a JSON format for representing JS
ASTs and possible a way to turn those into a function body.
Flapjax doesn't wouldn't benefit from extending JS syntax in ways that
this might enable?
I like the criteria laid out there. I think binding is a weakness
since, security constraints mean that we don't want to allow
introducing bindings not named, and left-hand-sides are not first
class in JS. There are proposals for multi assignment desugaring
though which could mitigate this somewhat.
> It should be possible to account for that.
>
> Arjun
>
> --
> Flapjax home page:
www.flapjax-lang.org
> Flapjax list:
groups.google.com/group/flapjax
> Post:
fla...@googlegroups.com
> Unsubscribe:
flapjax-u...@googlegroups.com