[Haskell-cafe] Re: IO is a bad example for Monads

ChrisK haskell at list.mightyreason.com
Tue Dec 11 06:04:59 EST 2007


Michael Vanier wrote:
> I haven't been following this thread closely, but would it be rude to
> suggest that someone who doesn't want to put the effort into learning
> the (admittedly difficult) concepts that Haskell embodies shouldn't be
> using the language? 

Sorry Michael, but I will take your post as a point for me to jump into this big
thread.  And let me say here at the top, that I don't like pigeonholing or
classifying or labeling people by a programming tool/language/style.

I think it would be rude to suggest that.  You are interested Haskell, and you
want to tell other people to be less interested in Haskell.  There is no person
who has "decide who _should_ learn Haskell" as their job description.

Specifically, if a new person does not know the concepts Haskell, then they also
cannot know whether they will eventually want to learn those concepts and how to
employ them.   And no one else should pretend that they can predict that either.
Imagine pile of fanciful "what if?" examples, if that helps.

> Haskell was never intended to be The Next Big
> Popular Language.  It was intended to be a purely functional language
> for people who want to use purely functional languages and who are
> willing to learn new concepts if it enables them to program in that
> style.

Authors do not control how people interpret their books. Haskell is free
software, and people may do _anything_ with it.  If they use Haskell as it is,
then they are using a purely functional language.  If they change the compiler,
then they are using it as a basis for experimentation.  Both are interesting,
because they interest the person doing them.

> That now includes IO and monads, so if people aren't willing to
> learn that, they should go on using python or whatever. 

If they are willing to learn to use Haskell and are willing to work around IO,
then I might be interested in what other solution they have come up with.  The
use of an IO monad in Haskell was not the original solution, and there are
various proposals to move beyond the IO monad.

> That said, of
> course we should strive to have better teaching materials, but there are
> a number of good IO/monad tutorials on the web.

I sometimes feel I am one of the handful of people who have not tried to write a
tutorial for IO/monad/warm-fuzzy-thing.

> I used to love programming in python, but then I learned Scheme, then
> Ocaml, and then Haskell and at each stage I absorbed a few new
> concepts.  Now programming in python feels very primitive to me. Haskell
> is interesting because it enables us to write programs more effectively
> (in many cases, at least) than we can in other languages, but the
> learning curve is steep -- there ain't no such thing as a free lunch.
> 
> Mike

I look at it this way:  Every person who adds Haskell, however shallowly, to
their repertoire acts as an example that may spur others to learn Haskell,
perhaps deeply.   And that is a win not because of language chauvinism, but
because of concept chauvinism.  I hope that a future "Next Big Popular Language"
has most of the concepts that make Haskell interesting.

-- 
Chris



More information about the Haskell-Cafe mailing list