On Thu, Dec 10, 2009 at 9:13 AM, John D. Earle <span dir="ltr">&lt;<a href="mailto:JohnDEarle@cox.net">JohnDEarle@cox.net</a>&gt;</span> 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;">
Most of the discussion centers on the benefits of functional programming and laziness. Haskell is not merely a lazy functional language. It is a pure lazy functional language. I may need to explain what laziness is. Laziness is where you work through the logic in its entirely before acting on the result. In strict evaluation the logic is worked out in parallel with execution which doesn&#39;t make complete sense, but it does allow for an architecture that is close to the machine. <br>
<div><div></div><br></div></blockquote><div><br>Just to roil the waters a bit: no programming language can ever hope to be &quot;purely functional&quot;, for the simple reason that real computation (i.e. computation involving IO, interactivity) cannot be functional.  &quot;Functional programming&quot; is an unfortunate misnomer.  On the other hand, languages can be algebraic.  The whole point is provability, not function-ness.<br>
<br>More generally:  judging by the many competing proposals addressing the issue of how to think formally about real computation (just google stuff like hypercomputation, interactive computation, etc.; <a href="http://www.hums.canterbury.ac.nz/phil/people/copeland.shtml#articles">Jack Copeland</a> has lots of interesting stuff on this) is still an open question.  Soare has <a href="http://www.people.cs.uchicago.edu/%7Esoare/History/">three essential papers</a> on the subject.  I guess the moral of the story is that the concepts and the terminology are both still unstable, so lots of terms in common use are rather ill-defined and misleading (e.g. functional programming).<br>
<br>Lazyness is just a matter of how one attaches an actual computation to an expression; a better term would be something like &quot;delayed evaluation&quot; or &quot;just-in-time computation&quot;.  You don&#39;t have to work through any logic to have laziness.  Just think about how one reads a mathematical text - you need not actually compute subformulae or even analyze them logically in order to work with them.  This applies right down to expressions like &quot;2+3&quot; - one probably would compute &quot;5&quot; on reading that, but what about &quot;12324/8353&quot;?  You&#39;d leave the computation until you absolutely had to do it - i.e. one would probably try to eliminate it algebraically first.<br>
<br>-gregg<br></div></div>