[erlang-questions] JavaScript compiler for Erlang

denis dloutrein.lists@REDACTED
Fri Jul 13 21:11:52 CEST 2007


I started thinking about compiling javascript into erlang one month ago, as
a possible need for a project in my company.

We are building an infrastructure allowing giving some services to our
users. But external developers (same company, but other teams) could build
their own custom services inside the infrastructure. Having these new users
to learn a new language to build a custom services (which can be quite
simple) can be badly perceived. Especially to some "average" developers
which even don't know what is a functional language; so when you have to
explain them that there is no for loops, that you can't change the value of
a variable... You see what I mean. I thought of javascript because is syntax
is quite similar to java and c++, and because it can be quite powerful if
you want to use advanced constructions.

Also, having done a lot of web development before, I remember that I was fed
up to switch from one language to another, when working on the client or the
server part, and not being able to share code. So for me, having a platform
able to use concurrency and distributing power of Erlang, allowing me to use
the same language for the client and server side seems appealing.

But it's true that compiling javascript into erlang isn't straighforward,
which is intellectualy interesting and challenging ;-)

Denis

2007/7/13, David Mercer <dmercer@REDACTED>:
>
> True, it is quite annoying to have to code AJAX with event handlers as
> opposed to just writing code linearly as you would in Erlang.  That,
> however, would justify compiling Erlang to Javascript, instead of vice
> cersa, so you can write your code in Erlang but distribute it to browsers
> in
> a language they understand.
>
> So my question stands: other than for intellectual edification, why would
> you compile Javascript to Erlang?  I'm not asking rhetorically; I'm hoping
> the answer will cause me to think about it on my drive home this
> evening...
>
> David
>
> -----Original Message-----
> From: erlang-questions-bounces@REDACTED
> [mailto:erlang-questions-bounces@REDACTED] On Behalf Of Charles Forsyth
> Sent: Friday, July 13, 2007 12:40
> To: erlang-questions@REDACTED
> Subject: Re: [erlang-questions] JavaScript compiler for Erlang
>
> > being said, since most Javascript development is done for the browser,
> > concurrent programming isn't as big an issue for most Javascript
> > programmers, ...
>
> that's changing: most interactive environments are concurrent
> environments,
> although the support
> for it in Javascript seems dismal.  (but then, it's dismal in most
> windowing
> systems, too.)
> that seems to force slightly unusual approaches
> (but those might anyway be interesting in themselves), such as:
>
> MapJAX: Data Structure Abstractions for Asynchronous Web Applications
> http://www.usenix.org/events/usenix07/tech/myers.html
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://www.erlang.org/mailman/listinfo/erlang-questions
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://www.erlang.org/mailman/listinfo/erlang-questions
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20070713/98aed28d/attachment.htm>


More information about the erlang-questions mailing list