What concepts/chapters are you having trouble on... Which code are you
having trouble understanding? (Monads? In RWH they delay introducing
monads because they want to show that they are nothing special since
they have "used" them without saying so. This is confusing unless you
know the secret---what a monad is, how to us it, why it's useful,
where they are hiding in chapters 9 and 10...)
You may want to read the Typeclassopedia and refer back to it as you read RWH:
http://www.haskell.org/sitewiki/images/8/85/TMR-Issue13.pdf
Jared.
So I have some thoughts, and hopefully you will forgive me if I have any
biases in answering the questions :-)
First of all, Haskell is a rather mind-altering experience. It
introduces three major concepts that are foreign to most: purity,
laziness, and an expressive type system. It, of course, is also a
functional language, and that's foreign to quite a few people, too.
With your brief OCaml experience, you've had some exposure to an
expressive type system and functional programming, but not to purity and
laziness. I feel like I can't overstate just how... *different* Haskell
is. It's like a high-yield CD. If you don't invest much in learning
it, the dividend won't be very impressive down the road.
So I guess what I'm saying is: are you sure you really understood
everything while just blowing through the first 10 chapters of the book?
I know that everybody learns differently, but I don't think I would
have internalized that content by just blowing through it.
I'd recommend taking the examples from those first 8 chapters, trying
them out, hacking on them a bit, until you're sure you understand what
they're doing. And, where you're stuck on the other chapters, ask here
with specific questions.
> Is this not really supposed to be an introductory book, as it appears
> to be marketed? If not, can anyone suggest a better introduction that
> can prepare me for the concepts in RHW?
RWH absolutely is intended to be an introductory book. The dilemma we
faced constantly is: what's the best way to tech an entirely different
way of programming to people that have only ever known something
different? As I wrote in a magazine once, Haskell manipulates functions
like Perl manipulates strings. It has no loops, no for or while,
because it has no need for them. And that's just the FP aspect of it.
The real mind-blowing stuff starts when you get to laziness, monads, and
purity.
In the end, we chose what we thought would work best for most people in
our target audience (experienced imperative programmers), but of course
it's a given that everybody learns differently, and there may be some
for whom our approach isn't the most effective.
-- John
http://www.haskell.org/tutorial/