On 29/11/2007, <b class="gmail_sendername">James Hague</b> <<a href="mailto:firstname.lastname@example.org">email@example.com</a>> wrote:<div><span class="gmail_quote"></span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
On Nov 28, 2007 7:34 AM, Joel Reymont <<a href="mailto:firstname.lastname@example.org">email@example.com</a>> wrote:<br>><br>> Write Lisp on the Erlang VM, write Haskell or a new language with an<br>> elegant syntax. Throw your lot into improving the existing VM.
<br><br>Agreed 100%. The Erlang VM is fantastic in a number of ways. It<br>supports the features that make Erlang great: message passing,<br>lightweight processes. It's also one of the fastest dynamic language<br>VMs out there. Plus it's easy to map imperative languages to Erlang
<br>(<a href="http://prog21.dadgum.com/5.html">http://prog21.dadgum.com/5.html</a>).</blockquote><div><br>The erlang VM is quite fantastic, but it is also quite restricted. There are many things it can NOT handle, for example destructive updates of objects. There are no instructions in the BEAM for doing that, at least there weren't. Björn? This severely restricts which languages you can implement on it. For example you cannot do a complete Scheme as it has destructive operations. I am not thinking about set! which is easy as it only modifies the environment but functions like vector-set! and string-set! which actually destructively modifies the objects themselves.
<br><br>I think adding that type of operation to the BEAM could be quite difficult as the effects are quite profound.<br><br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
And now a question: what's the best target for compiling to? Real<br>Erlang? Core Erlang? BEAM? I'm probably alone in this opinion, but<br>I think a light layer of syntactic sugar on top of raw, BEAM code<br>would be a fun and productive language--and even more flexible than
<br>Erlang. But relying on the BEAM VM to remain stable isn't reasonable.</blockquote><div><br>There are actually 4 different layers in the compiler to which you could compile:<br>
- Core Erlang<br>
- Kernel Erlang<br>
- BEAM code<br>
The kernel level is a low-level non BEAM specific layer which could be
compiled to any register machine. It would probably work against a
stack machine as well. It was a while since I worked on it so I can't
remember ALL the details.<br><br>Robert<br></div></div><br>