3 ms·
I too found learning Haskell difficult, because there is, or so it seems, quite a big hurdle to get over at the start. But it turns out that you can live in th
by gaius 12y ago
I too found learning Haskell difficult, because there is, or so it seems, quite a big hurdle to get over at the start.
But it turns out that you can live in the IO Monad and just write Haskell as if were a strongly-typed kind of Python, and quickly get to the point where you are doing something useful, and benefiting from the type system and lazy evaluation (e.g. being able to define an infinite list then just consume as much of it as you want) and the nice syntax for pattern matching, and so on. Then you can gradually add in more and more Haskell concepts as and when a) you feel ready and b) you encounter situations where they'd be useful.
Jumping straight in with monads is the wrong way to do it (and monads are actually easy if you let them sneak up on you rather than trying to chase them, like cats) and the monad tutorials you find on the web are all written by idiots who think they a lot cleverer than they are. Burrito Spacesuit guy, I'm looking at you.
- blackbook 12y agoSo, are you saying there are no tangible benefits?
- gaius 12y agoNot at all, there are loads, see for example http://donsbot.files.wordpress.com/2009/01/semicolon.pdf http://donsbot.files.wordpress.com/2009/01/semicolon.pdf What I'm saying is, don't let a minority of the community put you off. The "conventional wisdom" on how to learn Haskell, is wrong.
- blackbook 12y agoThanks for the link. I see 5 benefits listed. Concise code; native code optimization (LLVM) and compilation; parallel and concurrent runtime; debuggers, profiling tools, refactoring, coverage, testing tools; library support, distribution mechanisms. With the exception of concise code, however, I think I get the rest with a combination of clang and a good static analyzer, no?