<p class="MsoPlainText"><span style="" lang="EN-GB">I
started thinking about compiling javascript into erlang one month ago, as a
possible need for a project in my company. </span></p>

<p class="MsoPlainText"><span style="" lang="EN-GB">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.</span></p>

<p class="MsoPlainText"><span style="" lang="EN-GB">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.</span></p>



<p class="MsoPlainText"><span style="" lang="EN-GB">But it's true that compiling javascript into erlang isn't straighforward, which is intellectualy interesting and challenging ;-)<br></span></p><p class="MsoPlainText">
<span style="" lang="EN-GB">Denis</span></p>

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