<br><div class="gmail_quote">On Thu, Jun 5, 2008 at 2:23 PM, Bjorn Gustavsson <<a href="mailto:bjorn@erix.ericsson.se">bjorn@erix.ericsson.se</a>> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="Ih2E3d">"Gleb Peregud" <<a href="mailto:gleber.p@gmail.com">gleber.p@gmail.com</a>> writes:<br>
<br>
> According to <a href="http://wiki.reia-lang.org/wiki/Roadmap" target="_blank">http://wiki.reia-lang.org/wiki/Roadmap</a> :<br>
> The First Milestone: Compile to Erlang AST<br>
> And I assume that Erlang AST does not permit mutable variables, hence<br>
> it will probably not include mutable variables (unless hidden by Reia<br>
> -> Erlang AST translator)<br>
<br>
</div>It should be trivial to implement mutable variables, simply by inventing<br>
a new, unused variable name each time a mutable variable is assigned.<br>
(Further references to the mutable variable should be changed to refer<br>
to the new name, of course.)<br>
<br></blockquote><div>The big problem with this matter is that Erlang doesn't have variable assignment, it has pattern matching. So if we encounter a reference to an old variable in a pattern, should the old variable be used to check if it matches, or should a new fresh variable be created and matched against the right side? This could be solved for example by using special characters to denote fresh matching, but IMO the resulting mess is worse than the issue that it was created to solve.<br>
<br>regards,<br>Vlad<br></div></div>