<div class="gmail_quote">On Tue, Mar 17, 2009 at 5:51 PM, Adam Kelly <span dir="ltr"><<a href="mailto:cthulahoops@gmail.com">cthulahoops@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

Looking through your parse transform code it strikes me how few<br>
functions you are using.  This is a functional programming language<br>
and all the meat of your parse transform is in one function.   I'm not<br>
surprised that you keep wanting to reassign variables in this case. [...]<br>
 </blockquote><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
In 20,000 lines of Erlang, I think I've used numbered variables once.<br>
(And that needs refactoring!)<br>
</blockquote></div><br>If you like to scrutinize people who suggest destructive assignment
is an "interesting feature" by the code they implement to support it on
top of Erlang, I'd sure be interested in what you make of mine:<br>
<br>
<a href="http://github.com/tarcieri/reia/blob/master/src/compiler/reia_ssa.erl">http://github.com/tarcieri/reia/blob/master/src/compiler/reia_ssa.erl</a><br>
<br>
The main problems I see are: it's highly repetitive, and is also filled
with lots of numbered variables.  It's also not passing state around
correctly as I tried to retrofit records into it after managing the
transform state with tuples became too unwieldy.  I'm sure there's
probably a better general solution to statefully walking around trees
and transforming them in general.  Right now what I'm doing is pretty
slow.<br><br>Any suggestions (or patches :) are welcome.<br clear="all"><br>-- <br>Tony Arcieri<br><a href="http://medioh.com">medioh.com</a><br>