<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body 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'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 "discover" the monadic solution to IO, and is more<br>
generally what inspired many researchers to "discover" 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'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, "That's how
you'd do it in C++, but in Haskell here's a better way...".<br>
<br>
I hope I don't start a flame war with this post -- I'm just expressing
my opinion, which admittedly is probably regressive rather than
progressive :-).<br>
<br>
&nbsp; -Paul<br>
</font><br>
<pre class="moz-signature" cols="72">-- 
Professor Paul Hudak
Department of Computer Science    Office: (203) 432-1235
Yale University                   FAX:    (203) 432-0593
P.O. Box 208285                   email:  <a class="moz-txt-link-abbreviated" href="mailto:paul.hudak@yale.edu">paul.hudak@yale.edu</a>
New Haven, CT 06520-8285          WWW:    <a class="moz-txt-link-abbreviated" href="http://www.cs.yale.edu/~hudak">www.cs.yale.edu/~hudak</a>
</pre>
</body>
</html>