I agree with Dan here.<br><br>IO is important because you can'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. 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 <
<a href="mailto:dpiponi@gmail.com">dpiponi@gmail.com</a>> 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 <
<a href="mailto:ben.franksen@online.de">ben.franksen@online.de</a>> wrote:<br>> then the special features of IO<br>> will remain associated with monads in general, leading to a whole jumble of<br>> 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'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'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>> This is yet another problem with IO as the standard example for monads: its
<br>> effect base is huge and poorly structured.<br><br></div>You don't teach *all* of IO to students in one go!<br><div class="Ih2E3d"><br>> This again makes it difficult to<br>> see exactly which intuitions about IO can be generalized to arbitrary
<br>> monads and which not.<br><br></div>That'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's nose so they can already reason about monads before they<br>even know what a monad is.<br><div class="Ih2E3d"><br>> What is pointless about failure and how to handle it?<br><br></div>It's pointless when you're still trying to make your first tweaks to
<br>"Hello, World!" 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>