Advanced programming languages
matt.might.net
matt.might.net
He defines a `Lattice` class, and explains that if a type implements the `Lattice` class, it supports all the operations within the `Lattice` class.
He then presents an implementation of the `Lattice` class that doesn't support all the `Lattice` operations (`top` punts to `error`). It breaks the promise, breaks the contract, undermines the guarantees the type system gives you.
So don't use `error` in Haskell. (And for that matter, don't use other partial functions such as `head` and `tail`.)
why not say assembler "is a must for understanding how a program works"? because when you are talking about the underlying machine, that's what you mean.
but if you are not speaking about the machine, but the program (algorithms within) a higher-level language might even lead to better understanding because you can focus on the important parts. that language does not have to be functional (some algorithms _are_ imperative) but might be, say, python.
For many people python is their first language.
(i like many new-in-c++11 constructs so don't get me wrong. but they further abstract from the machine.)
shouldn't students learn lambda-calculus? shouldn't you teach a functional programming language then? or even a logic programming language? "the real-world software stack" is not the most important thing in the world.