There are many ways to implement currying.&nbsp; And even with GHC you can get it to do some work given one argument if you write the function the right way.&nbsp; I&#39;ve used this in some code where it was crucial.<br><br>But yeah, a code generator at run time is a very cool idea, and one that has been studied, but not enough.
<br><br>&nbsp; -- Lennart<br><br><div><span class="gmail_quote">On 10/31/07, <b class="gmail_sendername">Dan Piponi</b> &lt;<a href="mailto:dpiponi@gmail.com">dpiponi@gmail.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
On 10/31/07, Neil Mitchell &lt;<a href="mailto:ndmitchell@gmail.com">ndmitchell@gmail.com</a>&gt; wrote:<br>&gt; in the long run Haskell should be aiming for equivalence with highly<br>&gt; optimised C.<br><br>Really, that&#39;s not very ambitious. Haskell should be setting its
<br>sights higher. :-)<br><br>When I first started reading about Haskell I misunderstood what<br>currying was all about. I thought that if you provided one argument to<br>a two argument function, say, then it&#39;d do partial evaluation. Very I
<br>soon I was sorely let down as I discovered that it simply made a<br>closure that waits for the second argument to arrive so the reduction<br>can be carried out.<br><br>But every day, while coding at work (in C++), I see situations where
<br>true partial evaluation would give a big performance payoff, and yet<br>there are so few languages that natively support it. Of course it<br>would require part of the compiler to be present in the runtime. But<br>by generating code in inner loops specialised to the data at hand it
<br>could easily outperform C code in a wide variety of real world code. I<br>know there has been some research in this area, and some commercial<br>C++ products for partial evaluation have appeared, so I&#39;d love to see
<br>it in an easy to use Haskell form one day.<br><br>Just dreaming, I know...<br>--<br>Dan<br>_______________________________________________<br>Haskell-Cafe mailing list<br><a href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org
</a><br><a href="http://www.haskell.org/mailman/listinfo/haskell-cafe">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br></blockquote></div><br>