I agree with Dan here.<br><br>IO is important because you can&#39;t write any real program without using it.<br>So why not teach enough of it to get people off the ground straight away?<br><br>People who hang around long enough to do some more Haskell programming
<br>will run into the other monads sooner or later.&nbsp; But IO is an unavoidable step to<br>writing Haskell programs.<br><font color="#888888"><br><br></font><br><div class="gmail_quote">On Dec 4, 2007 5:11 AM, Dan Piponi &lt;
<a href="mailto:dpiponi@gmail.com">dpiponi@gmail.com</a>&gt; wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="Ih2E3d">On Dec 3, 2007 6:36 PM, Ben Franksen &lt;
<a href="mailto:ben.franksen@online.de">ben.franksen@online.de</a>&gt; wrote:<br>&gt; then the special features of IO<br>&gt; will remain associated with monads in general, leading to a whole jumble of<br>&gt; completely wrong ideas about them.
<br><br></div>As I only learnt about monads a couple of years ago, the process is<br>still fresh in my mind. I wasted quite a bit of time labouring under<br>the impression that monads were primarily about sequencing. But that
<br>wasn&#39;t because I incorrectly generalised from IO. It was because<br>countless people out there explicitly said they were about sequencing.<br>I suspect that if courses started with the List monad there&#39;d be<br>
countless blogs telling people that monads are a way to eliminate<br>loops from your code like the way list comprehensions are used in<br>Python.<br><div class="Ih2E3d"><br>&gt; This is yet another problem with IO as the standard example for monads: its
<br>&gt; effect base is huge and poorly structured.<br><br></div>You don&#39;t teach *all* of IO to students in one go!<br><div class="Ih2E3d"><br>&gt; This again makes it difficult to<br>&gt; see exactly which intuitions about IO can be generalized to arbitrary
<br>&gt; monads and which not.<br><br></div>That&#39;s true of any monad. IO is unique. [] is unique. Cont is unique.<br>All of them can lead you down the garden path. You need to see<br>multiple monads, and it helps if you can sneak an example under a
<br>student&#39;s nose so they can already reason about monads before they<br>even know what a monad is.<br><div class="Ih2E3d"><br>&gt; What is pointless about failure and how to handle it?<br><br></div>It&#39;s pointless when you&#39;re still trying to make your first tweaks to
<br>&quot;Hello, World!&quot; work.<br>--<br><font color="#888888">Dan<br></font><div><div></div><div class="Wj3C7c">_______________________________________________<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" target="_blank">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br></div></div></blockquote></div><br>