[erlang-questions] JavaScript compiler for Erlang

Bob Ippolito <>
Mon Jul 16 22:06:10 CEST 2007

On 7/16/07, Jeff Rogers <> wrote:
> Joel Reymont wrote:
> > This is the reason I asked.
> >
> > Think scalable web development for the masses.
> >
> > In Javascript.
> >
> > On top of Erlang.
> Not meaning to discourage any effort here - a JS implementation in
> erlang might be an interesting project and have some uses, and as others
> have pointed out implementing languages is fun - the goal of "... for
> the masses" is misguided.  Syntax isn't the problem - if it was, we'd
> all be programming in COBOL.  Sure, erlang syntax is a little different,
> but its the programming philosophy that is alot different, and putting a
> javascript face on that isn't going to make it any more accessible.
> Unless you're going to be able to accurately translate idiomatic
> javascript into idiomatic erlang you're going to have an erlang program
> that uses a single process with no message passing, no exception
> handling, no matching, etc., and then it really isn't erlang anymore.

That argument only makes sense if you're talking about writing whole
programs in JavaScript and then compiling them down to Erlang.

Syntax is definitely a problem in certain contexts, and embedding a
language in Erlang (one way or another) is an obvious solution to
that. In the JavaScript case you're probably going to be having lots
of little JS interpreters all over the place (e.g. one per HTTP
request) so the imperative nature of how idiomatic JS works isn't
really a big deal. They're all isolated from one another, and you've
got plenty of them.


More information about the erlang-questions mailing list