Somehow you have reached this page because you are interested to find out something about Haskell, or you want to learn Haskell. Here we provide you with a set of pointers, and an plan of attack. We assume that you have some programming experience. Any comments of this paper are awelcome, since they will help the people coming after you.
What does it mean to learn a programming language?
Learning a new programming language involves a number of different activities. We mention them here explicitly so that you, once you run into problems, can probably classify your problem, and know where to look for an answer.
In the first place you will have to learn grammar
; once you know the grammar of a language you can form correct sentences. Fortunately you do not have to learn the complete grammar before you can start using the language (if this were true most people would remain silent for their complete life). Haskell is defined in the Haskell98 report, but to be honest, this is not tyhe place where to start from. It is however useful to keep in mind that once you run into a problem, you can try to look up rthe precise definition in the report. Currently a newer version of the report is in the works, so you should not be surpised if it suddenly shows up. On the other hand for you, as a beginner, there is no need to run for it.
Many courses teach Haskell in s a stepwise fashion, gradually introducing new concepts. Keep in mind that Haskell is a large language, with many subtle corners. A dilemma for many courses is the question: "Should I tell precisely how things are defined, or is it sufficient for the time being to give an approximation of the truth, or the underlying structures?". Anotehr thing you will notice is that many things that are defined as part of the grammar in other languages, are actually defined through libraries in Haskell. We can do so since Haskell is a very powerful language, with great features for building advanced libraries.
Besides grammar you have to build your own vocabulary. In programming languages this means: you have to learn what can be found in libraries, and where to find those libraries. When programming it is a good strategy to look every now and then to see whether there is not a library that actually solves your problem already. Studying librraies is also a good way to learn how to use the language.
Every programming language has special ways of "doing things". It is here that you will be most surpised, since the way things are done in a lazy evaluated, strongly typed, purely functional language may be quite different from what you have been used to thus far. This is also one of the things that are discussed most on the mailing lists, where many treads strat with "I tried to do this and that in a such and so way, but am I right in pusuing this path, or is there a completely different way of doing this". Usually the answer to these questions is an affirmative "yes", espcially if the
- 06 Feb 2007