On Wed, Jun 4, 2008 at 1:57 PM, Deryk Barker <<a href="mailto:dbarker@camosun.bc.ca">dbarker@camosun.bc.ca</a>> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I was quite interested until I saw that it supports multiple<br>
assignments to a variable.<br>
</blockquote></div><br>Hi everyone, I'm Reia's creator.  I wasn't quite ready for Reia to wind up here yet, but since it has, here's my responses to the concerns that have been raised.  I'll also be doing an official announcement some time in the next few weeks, when I've finished implementing the majority of the features found in sequential Erlang.<br>
<br>--<br><br>On multiple assignment / modifying receivers: I'm still torn on this.  Multiple assignment is not actually supported in Reia yet.  I'm not necessarily sure if I really like the idea, but I'm probably still planning on implementing it soon.<br>
<br>The basic idea is to use alpha conversion which maps to new identifiers whenever a variable is potentially rebound.  This is what Mikael was describing in the first example above. The bodies of imperative loops are decomposed into named, tail recursive functions which return the new values of any potentially rebound variables, and the binding in the scope of the original function is updated when the looping function returns.<br>
<br>Quite a few hoops to go through just to remove what's arguably one of Erlang's most important features.  Furthermore state in Reia remains immutable which can cause some confusion, since multiple assignment with immutable state doesn't give the same semantics that mutable state does (for example, old references to the same structure are not updated when the structure is "mutated").  This may be particularly confusing with functions that modify their receiver, since a new copy of the receiver is made with the modifications and the original binding updated to point to the new version.<br>
<br>All that said, you may see all references to multiple assignment removed from the Wiki soon.  I'm still mulling it over.<br><br>--<br><br>On Core Erlang: I'd originally considered having Reia target Core Erlang.  However, Reia makes extensive use of erl_eval.  Reia's interpreter allows code outside the scope of modules, / functions, which is evaluated using erl_eval.  Reia also has an interactive interpreter / REPL which uses erl_eval.<br>
<br>Perhaps I'm just ignorant but I know of no way to evaluate Core Erlang.  I've noticed many projects which target Core Erlang do not have interactive interpreters and it seems to be for this very reason.  I consider an interactive interpreter an essential feature, and erl_eval is also the source of Reia's scripting abilities (i.e. arbitrary code defined outside modules).<br>
<br>I'd like to eventually target Core Erlang, but it seems that in order to do so I'd have to write my own eval for Reia's forms or implement conversion of Reia to both Erlang forms and Core Erlang forms, and neither of those sound like particularly desirable options, at least for the time being.<br>
<br>If someone knows of a way to eval Core Erlang, it'd certainly resolve all these problems.<br><br>-- <br>Tony Arcieri<br><a href="http://medioh.com">medioh.com</a>