For what it&#39;s worth from a Haskell newbie (and from someone who&#39;s been doing FP since November, mainly in Scala.)<br><br>I really like Haskell&#39;s purity and having the clear separation between zero side effects and monads is most excellent.
<br><br>It was quite a brain change to program functionally.&nbsp; It took a lot of work and a lot of discipline.&nbsp; In Scala, I set myself the goal of not having any variables (except as instance variables of a very limited number of classes... Scala doesn&#39;t support monads), but to only use single-assignment values.&nbsp; At first, it was really hard to think in a new way.&nbsp; Now, I find that, even when I write Java code, I write in a functional style.
<br><br>The benefit for me is reducing the number of moving parts as well as forcing me to do significantly more design work up front.&nbsp; Now, the OO ideal was to model ones class hierarchy and the messages and the code will all flow automagically.&nbsp; In my 17 years, dozens of commercial applications, and 1M+ LoC of OO programming, it&#39;s never worked that way for me.
<br><br>On the other hand, programming in a state-minimized (or state-free) way makes me work a lot more to define my types and how the types interact with each other.&nbsp; I find that I&#39;m spending a lot more time &quot;up front&quot; piecing the types together.&nbsp; I am spending no time worrying about hidden state (gee, if I call X before I call Y, the state will not be set up, so I have to shoe-horn some sort of test to make sure that the state is set up correctly.)
<br><br>I also find that my code is shorter and less dense at the same time.&nbsp; The &quot;what&quot; part of my code is easier to see because filter/map/zip constructs are a lot less distracting than &quot;new array/for/if/...&quot; constructs.
<br><br>The proof is in the output for me.&nbsp; My web framework (<a href="http://liftweb.net">http://liftweb.net</a>) and the commercial product that my team is building with Scala (<a href="http://www.circleshare.com">http://www.circleshare.com
</a>) have been remarkably stable and low in bugs. And the bugs have by and large been &quot;logic&quot; bugs rather than &quot;changing X which caused a bug in Z because the state was wrong&quot; bugs. The code bases are large enough, that I&#39;d normally be expecting to see breakage from unexpected side effects from code changes.&nbsp; That hasn&#39;t started happening.
<br><br>Part of the challenge that Haskell and Scala and the other FP languages face is the pain developers face as they change the way they approach and solve problems.&nbsp; Based on my 28 years of professional coding, I think that FP is the single best and single most important technology that I&#39;ve invested my time in.&nbsp; I think that Haskell&#39;s brand of purity is hyper-important and will allow for assembly of significantly more complex systems than will any other technology that I&#39;ve seen.
<br><br>Please, keep to the vision.&nbsp; The vision is powerful, inspiring, and I believe correct.<br><br>Thanks,<br><br>David<br><br><div><span class="gmail_quote">On 8/8/07, <b class="gmail_sendername">Paul Hudak</b> &lt;<a href="mailto:paul.hudak@yale.edu">
paul.hudak@yale.edu</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;">


  

<div bgcolor="#ffffff" text="#000000">
<font face="Arial">All of the recent talk of support for imperative
programming in Haskell makes me really nervous.&nbsp; To be honest, I&#39;ve
always been a bit uncomfortable even with monad syntax.&nbsp; Instead of:<br>
<br>
do x &lt;- cmd1<br>
&nbsp; &nbsp;&nbsp; y &lt;- cmd2<br>
&nbsp;&nbsp;&nbsp;&nbsp; ...<br>
&nbsp;&nbsp;&nbsp;&nbsp; return e<br>
<br>
I was always perfectly happy with:<br>
<br>
cmd1 &gt;&gt;= \x-&gt;<br>
cmd2 &gt;&gt;= \y-&gt;<br>
...<br>
return e<br>
<br>
Functions are in my comfort zone; syntax that hides them takes me out
of my comfort zone.<br>
<br>
In my opinion one of the key principles in the design of Haskell has
been the insistence on purity.&nbsp; It is arguably what led the Haskell
designers to &quot;discover&quot; the monadic solution to IO, and is more<br>
generally what inspired many researchers to &quot;discover&quot; purely
functional solutions to many seemingly imperative problems.&nbsp; With
references and mutable data structures and IO and who-knows-what-else
to support the Imperative Way, this discovery process becomes stunted.<br>
<br>
Well, you could argue, monad syntax is what really made Haskell become
more accepted by the masses, and you may be right (although perhaps
Simon&#39;s extraordinary performance at OSCOM is more of what we need).&nbsp;
On the other hand, if we give imperative programmers the tools to do
all the things they are used to doing in C++, then we will be depriving
them of the joys of programming in the Functional Way.&nbsp; How many times
have we seen responses to newbie posts along the lines of, &quot;That&#39;s how
you&#39;d do it in C++, but in Haskell here&#39;s a better way...&quot;.<br>
<br>
I hope I don&#39;t start a flame war with this post -- I&#39;m just expressing
my opinion, which admittedly is probably regressive rather than
progressive :-).<br>
<br>
&nbsp; -Paul<br>
</font><br>
<pre cols="72">-- <br>Professor Paul Hudak<br>Department of Computer Science    Office: (203) 432-1235<br>Yale University                   FAX:    (203) 432-0593<br>P.O. Box 208285                   email:  <a href="mailto:paul.hudak@yale.edu" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
paul.hudak@yale.edu</a>
New Haven, CT 06520-8285          WWW:    <a href="http://www.cs.yale.edu/%7Ehudak" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">www.cs.yale.edu/~hudak</a>
</pre>
</div>

<br>_______________________________________________<br>Haskell-Cafe mailing list<br><a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br><a onclick="return top.js.OpenExtLink(window,event,this)" href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">
http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br><br></blockquote></div><br><br clear="all"><br>-- <br>lift, the fast, powerful, easy web framework<br><a href="http://liftweb.net">http://liftweb.net</a>