Hacker News new | ask | show | jobs
by ixmatus 4399 days ago
Someone told me this: with Haskell you end up reading a lot more up-front than you do "playing around" up-front. The reason for this is the type system which can feel like a straight jacket at first unless you understand it well.

Don't read the monad tutorials. At all. Get a feel for the language with http://learnyouahaskell.com/chapters (you don't need to read the whole thing through, but probably should).

Once you've played with the basics then you should absolutely read the http://www.haskell.org/haskellwiki/Typeclassopedia which gives you a very thoroughly walking through of the Type System and is essential but heavy reading to be at all productive with Haskell.

After that make sure you are using Hoogle to search for functions that already exist!!! http://www.haskell.org/hoogle/

One strategy no one really told me about: search for functions based on their type and less their "name".

Then after that, Gabriel Gonzalez writes some really great noob-intermediate friendly tutorials on Haskell in-general: http://www.haskellforall.com/ (don't start with his stuff though as you should have familiarity with Haskell basics first!!).

Once you're proficient, having Hoogle built into your command-line, using CTAGS + codex, Lambdabot + Emacs, and GHC-mod + emacs is pretty crucial to my workflow.

Hoogle in the commandline is really powerful, CTAGS + codex is basically CTAGS for haskell source files (if you don't know what ctags are look it up), and lambdabot is a powerful tool that is tough to explain but it's the omnipotent haskell bot sitting in the #haskell IRC channel (but you can install it on your machine and query it from Emacs).

1 comments

> The reason for this is the type system which can feel like a straight jacket at first unless you understand it well.

This is a biggy. It'll feel like the type-system has a personal vendetta against you when you first start. Especially if you come from a language that allows you to coerce types. Basically stop thinking you can get around the type system and instead follow them. See them as connectors of computations rather than carriers of values.