How much time have you invested in order to have a good grasp on Haskell?

I know this question may sound silly, but I am learning (at least trying) Haskell for about 4 days. I've already finished to read http://learnyouahaskell.com/, and now I am investing time in: The Haskell Road to Logic, Math and Programming, and things got really complicated for me. I don't have experience in functional programming, just some basic knowledge on Lisp.

Even though I understand the concepts, when I have to write a not so basic piece of code, there's a total darkness and I cannot build a plan in my head. It seems that there are a lot of ways to accomplish a certain task, but I cannot express myself.

After 4 days of python, I could've write complex scripts (not 'pythonic', but they did work). After 4 days in haskell, I am ... almost blank.

Any suggestions on how to improve my functional skills ? How long did it take for you to fully grasp Haskell ?


After about 2 years there are some parts of Haskell I know very well (Ptr stuff, vector libraries), some areas I know just enough to be dangerous (template haskell), and others I haven't touched (web frameworks, generics). Overall, though, I think I understand the language pretty well.

A large difficulty of learning Haskell is the (very steep IMO) learning curve. There are a lot of different inter-connected things you need to learn before you can be productive in the language, and because they're interconnected it's difficult to get a good sense of them without at least a few months of experience. My advice is to keep at it, and if you think you don't understand something, or that something deeper is happening, you're probably right. If you can't figure it out now, just move on and come back to it in a month or so. Eventually you'll make enough progress on multiple fronts that everything should become clear.

Like any language, the best way to make progress is to write code. It will take longer because Haskell is further away from the languages you already know, but it will be worth it.


Well, after 2 years I still don't fully grasp everything about Haskell. I can write "advanced" programs (after ca. 2-3 months of starting to learn Haskell), but people keep coming up with new stuff to learn, which is part of the fun of Haskell :)

As for how best to learn, I always like to learn by doing. Browse through the code of something you're interested in on Hackage (something not to big) and then try to implement something like it yourself (or a subset). Pick a project you can keep adding more difficut layers to over time.


After a 150 hour functional programming course at university, we did

  • Sorting functions
  • Making binary tree's
  • Using/writing functions like map, filter, zip
  • .. might have forgotten something
  • So just basics I'd say, in about one month full time. Four days is nothing... I think you'll just have to write more code to get used to the functional programming way of thinking. Implementing everything from bottom to top, doing harder stuff as you gain experience.

    链接地址: http://www.djcxy.com/p/80790.html

    上一篇: 学习Haskell地图,折叠,循环和递归

    下一篇: 你花了多少时间才能掌握Haskell?