[Haskell-cafe] Writing "Haskell For Dummies Or At Least For
People Who Feel Like Dummies When They See The Word 'Monad'"
J. Garrett Morris
trevion at gmail.com
Tue Dec 12 13:49:32 EST 2006
On 12/12/06, Ketil Malde <Ketil.Malde at bccs.uib.no> wrote:
> Some things took a bit of effort to wrap my head
> around, but it generally wasn't too hard to get to a level where I could
> write useful programs.
> * I'm already productive with what I know, so I don't have the direct
I think this is the major obstacle. I've had similar experiences with
programmers of all skill levels. For one example, when I was TA'ing
an introduction to FP course in college, we regularly had students
who, once they had learned primitive recursion, would write every
assignment (that didn't specifically exclude primitive recursion)
recursively for the remainder of the quarter, no matter how much
easier it would have been in terms of (for example) map and filter.
For another examples, I've spent more time than I want to admit
reinventing (or failing to reinvent) various wheels in Haskell
(including arrows and COM's IUnknown) because I was fairly convinced
that I knew everything I needed to solve whatever problem I was
>From my experience, I'd suggest a couple of things: first, I think
starting from "simple" ideas -- like primitive recursion -- is deadly.
Instead, I'd rather earlier sections focused on less complex
applications of rich ideas. For example, in a discussion of rewriting
the aforementioned FP class, I rewrote the first project of the
quarter from relying on primitive recursion over the integers to using
function and Kleisli composition. I'm not necessarily suggesting
that freshmen will understand Kleisli composition, but in this case
the development of the composition operator was fairly natural for the
problem, and when they came back to Kleisli composition later, they
would have already seen it (as opposed to having seen a less useful
Second, I think that introducing at least monadic programming as early
as possible is a good idea. My experience with people who've learned
Haskell for jobs or courses (as opposed to for love of the game, so to
speak) is that monadic programming frequently ends up regarded as a
separate set of mysteries that's perhaps convenient for wizards but
not necessary for normal programmers. This leads to another boundary
when people who have learned a certain amount of Haskell and even
written large amounts of Haskell look at code from more monad-happy
projects and find it written in what looks like a foreign tongue.
Finally, count me among those who would be happy to contribute as soon
as there's a wiki or similar available!
It is myself I have never met, whose face is pasted on the underside of my mind.
More information about the Haskell-Cafe