[Haskell-cafe] Haskell & monads for newbies (was "Functional dependencies *not* part of the next Haskell standard?")

Andrew Coppin andrewcoppin at btinternet.com
Thu Jul 12 14:33:24 EDT 2007


peterv wrote:
> It looks like its gonna take a long time for me to learn Haskell. I'm not
> sure if my long history of imperative and object-oriented programming has
> something to do with it. Reading Haskell books like SOE is one thing, but
> writing software in Haskell is really difficult for me.

It takes practice. ;-)

> Not only do I miss
> the "spoiled OO programmer" IDEs with all their candy and code completion
> and assistants

Ah, but in Haskell, you don't need to *write* as much code in the first 
place! :-D

> but I also get the feeling that although similar programs in
> Haskell or typically N times shorter than their imp/OO counterparts, it
> would take *me* at least N^2 longer to write them ;) 
> Is this true for Haskell in general?

Yeah, Haskell is definitely *not* a language for "hacking away as fast 
as your fingers can type without thinking too much". It's more like a 
game of chess - you spend a lot of time trying to bend your mind around 
the best way to achieve a thing. But then, when you actually start 
typing, you often get there faster.

Or realise that the type system is going to stop you... :-/

> Regarding those monads, I read a lot of stuff about these beast, trying to
> get a high-level understanding about them (and apparently I'm not the only
> newby who struggled with that ;), but after having read "You Could Have
> Invented Monads!" and then reading
> http://research.microsoft.com/~simonpj/papers/marktoberdorf, it all became
> much clearer. Those pictures really helped... 
>   

Monads take a while to "get used to", but they're not so scary after that...



More information about the Haskell-Cafe mailing list