Usually when I learn a new programming language, I’ll hang out on its mailing lists and IRC channels, learning from the answers given to other people’s questions, and asking my own. After a month or two, I usually feel fairly good with my abilities; that I could answer most of the questions, and understand most of the questions.
Well, I’ve been using Haskell for about 6 months now. I really like Haskell, and it’s a great language to use, and it’s already my preferred language.
But here’s what’s unique about Haskell. The more I use it, and the more I participate with the Haskell community, the more I realize just how much there is that I could learn. And it seems that I’m not alone with that feeling.
I wonder why Haskell is unique this way.
I really enjoy programming in both Haskell and Lisp (particularly Scheme). I have programmed more in Lisp, but I can’t make up my mind as to which of the two I like the most. If you haven’t programmed in Lisp, I suggest you check it out. :)
I have tried Lisp, but never found it to be all that much fun to use. Haskell seems more flexible to me, and its type system is very, very slick.
If up for a shock, google for hemacs sometime :-)
I think that part of the reason that Haskell is the way you describe is that the community is made up, in large part, by people who are more mathematician than average code-monkey, so to speak. :)
I like math a lot, and I’ve always been pretty good at it. However, taking courses on abstract algebra in college gave me a lot of the same feeling as learning Haskell does. There are a lot of concepts in higher mathematics that I simply have to work a while at to understand, moreso than, say, your basic calculus courses.
There’s a similar dichotomy between Haskell and other ‘pragmatic’ (for lack of a better term; I’m not saying Haskell isn’t useful for real programs) languages. In languages like Ruby (which I love) and C and Python, a lot of effort goes into making things accessible and convenient. Haskell seems more focused on theoretical purity. While that makes for a very powerful language, it also makes it somewhat obtuse and hard to grasp. To really make use of the power of the language, you have to understand a lot of concepts that are somewhat foreign to what most programmers focus on.
And I suppose by consequence, Haskell naturally attracts a lot of the theoreticians who are interested in that sort of thing. So naturally there’s a lot more brainpower than an average Joe like myself in the community, and you end up with a situation like you describe.
Then again, I fancy myself becoming a theoretician one day, and being able to easily answer questions about ‘what sort of existential type do I need?’ and submitting my own “Research papers on Advanced Functional Programming,” and so on. :)
I think there is something to this. At the same time, I’ve been part of other communities which fit the definition of having large academic participation, and haven’t felt the same way there (OCaml, for instance). My gut says you’re on the right track, but there’s something else.
Maybe it’s that Haskell gets all the cool new features about a decade before other languages, dunno…
I’d disagree with you a bit with you about Haskell being hard to grasp. I think that Haskell is one of, if not THE, most intuitive language I’ve seen yet. What makes it seem hard at first is that it is so incredibly different from all the languages most people already know.
I’m definitely in the practical, not the theoretical, camp, yet I found Haskell easy to learn and use.
At the same time, there are a lot of people doing things with Haskell that I frankly can’t even begin to comprehend yet. Even some things in the Haskell standard library are beyond me.
To me, that’s good. I have a good, working, useful language. And I know that it will still be useful for me in the future when I learn more about computer science.
One thing I’ll grant is that a lot of documentation for Haskell makes it *seem* obtuse because it’s written for the theoretical people, not practical folks like us. I hope to change that someday.
Well, I agree. I don’t think Haskell itself is hard to grasp. It is a very beautiful and intuitive language. My problems of understanding also come mainly from the standard library and what other people are doing.
Take the State monad as an example. Yet Another Haskell Tutorial has a great introduction to it. It shows how you’d normally have to thread any state through your functions, and then it shows how you can abstract out the concept of state, and finally turn it into a monad, so that all state is automatically threaded through your functions.
I can follow each individual step, but at the end, I have trouble remembering how I got there. To take it back to my algebra classes, I was often able to read and follow individual lemmas and theorems, but when they all came together to prove something big, I wouldn’t have a gut feel for what was going on from start to finish. Eventually something would click and I’d be able to really ‘grok’ what was going on, but it would take a while. Similarly, I haven’t really grokked a lot of the stuff that goes on in Haskell (not the language itself, but the stuff that people do with it :)).
Even most academic languages I’ve experienced don’t seem to have as much of a component of theorem proving. With Scheme, if you understand higher order functions and continuations, you pretty much understand everything that’s going on. Yes, you can build complex macros that let you produce simple syntax that does very powerful things, but the concepts are rather basic.
A lot of abstraction in Haskell, rather than syntax munging, or identifying patterns in data, seems to come from identifying almost mathematical patterns in code itself. Then with type classes, you can write code that operates on these general mathematical structures. You end up with something very powerful, and probably more general than objects, classes and the like. However, you either have to be exceptionally intelligent or work for a while to understand it at a gut level.
I’m not sure how much of a pragmatist I really am. :) I really enjoy reading about language design and the like, and I could see myself doing it some day. I’m just not at the level of understanding that many people in the Haskell community are at the moment. :)
Thanks for elaborating. You’ve hit it right on, and said it better than me, too. I completely agree with what you’re saying.