Today I gave a presentation about my personal favorite programming language: Haskell. This is what I presented, which is also available in PDF format.
What is Haskell?
Before we get into how to actually build stuff in Haskell, you should have at least a basic understanding of what Haskell is, and how it differs from the programming languages you’re likely to already know.
Haskell is a lazy, purely functional programming language. This means a few things:
Laziness: Last-Minute Evaluation
One of the ways that Haskell improves the performance and expressiveness of code is through laziness. This means that nothing you write in Haskell is evaluated until it has to be. Let’s look at an example from GHCi, the Haskell interpreter:
> let x = 3 + 7 > x 10
You might think that the
3 + 7 expression is evaluated in the first line, but
it’s not. In fact, evaluation doesn’t happen until the second line. The first
line is instead a promise to evaluate
x to that particular value when it’s
x is called for, the evaluation doesn’t happen, and if
never called for, the evaluation never happens at all.