<div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">I think there is a tendency to look at IO as bad because pure code is so much better.  But it&#39;s important to keep things in perspective - the existence of something better doesn&#39;t make something bad.  IO is still better than the best of most other languages.</blockquote>
<div><br></div><meta charset="utf-8"><span class="Apple-style-span" style="border-collapse: collapse; color: rgb(68, 68, 68); font-family: arial, sans-serif; font-size: 13px; "><div>I have been bashing IO from time to time on <a href="http://lambda-the-ultimate.org/" target="_blank" style="color: rgb(34, 34, 34); ">lambda-the-ultimate.org</a> (LtU). I can&#39;t say I got a lot of response, so I don&#39;t think there&#39;s a lot of hate around.</div>
<div><br></div><div>The thing about IO is that it solves one problem well: interfacing with an imperative sequential world. Old manners like stream handling functions are just plain awkward and need some kind rendezvous; uniqueness typing is fast, composable, but a bit awkward too, and -truth be told- better encapsulated in its own monad probably anyway. </div>
<div><br></div><div><meta charset="utf-8"><div>There also is certainly a case that banning benign side effects might have a lot more to do with the fact that that is inherently difficult in a lazy pure language (and compiler for that) than that it&#39;s so bad for the average programmer.</div>
<div><br></div>The thing against the IO monad is not that there&#39;s anything wrong with it. Just that it kind of locks programmers into a style of programming, I believe, functional programming is just trying to avoid, i.e., imperative programming.</div>
<div><br></div></span><span class="Apple-style-span" style="border-collapse: collapse; color: rgb(68, 68, 68); font-family: arial, sans-serif; font-size: 13px; ">The whole point of old-school functional programming was (always) to declaratively build libraries out of combinators which implement a specific purpose. Now, I don&#39;t know Haskell that well, but it feels to me that a lot of libraries written are now in a sequential imperative style instead of that combinatorial style.</span><span class="Apple-style-span" style="border-collapse: collapse; color: rgb(68, 68, 68); font-family: arial, sans-serif; font-size: 13px; "><div>
<br></div><div>So, I, for one, are not against IO, but consider it something which should be avoided instead of cuddled.</div><div><br></div></span><div><span class="Apple-style-span" style="border-collapse: collapse; color: rgb(68, 68, 68); font-family: arial, sans-serif; font-size: 13px; ">Cheers, Marco</span></div>
<div><span class="Apple-style-span" style="border-collapse: collapse; color: rgb(68, 68, 68); font-family: arial, sans-serif; font-size: 13px; "><br></span></div><div><span class="Apple-style-span" style="border-collapse: collapse; color: rgb(68, 68, 68); font-family: arial, sans-serif; font-size: 13px; ">(Sorry for sending multiple copies James; the woes of gmail... sigh...)</span></div>
</div>