“The main point of this series will be to highlight the differences between Haskell and those “typical” languages that I’ve mentioned.”
This is important. Some introductions to Haskell try to start from nothing. That doesn’t make a lot of sense to me. Most people coming to Haskell probably know more than one programming language already. Why not leverage that?
As with natural languages, new programming languages are most easily learned by studying the differences. This is why it’s pretty easy to learn Italian if you know Spanish and vice versa, while learning Japanese if you’re coming from English will be hard. Having learned a fair amount of Japanese as a native English speaker (in classrooms where the Koreans zoomed right past me – they had that language-similarity advantage), learning Haskell – which I’m still doing – has a lot of the same feeling. It’s just very different. I learned maybe a dozen programming languages before I learned Erlang. Erlang is also pretty different, and sort of a struggle. But not too bad. Haskell feels well beyond even Erlang in foreign-ness. Tell people early and often: if you feel like your intuitions are failing you, it’s because they are. The intuitive is the familiar. Haskell is very unfamiliar. Haskell is from another planet. It’s only natural that you’re having trouble.
Some suggestions (from not yet reading to the end, mind you)
VS Code – I tried to get started with this on Windows 10, to get a nicer Haskell debugging environment, but it broke mysteriously. After struggling for a while, I had an intuition (from past hard experience). I checked how the interface handles embedded blanks in file paths. Yep, it doesn’t handle those correctly. I was starting from my user account, which is my name, which has a space between “Michael” and “Turner”. Knowing this in advance could save some people a few hours getting started.
“instance” – a term that’s different enough in Haskell that I think some explanation of the error message is in order. Here is a good place to say what an instance is in Haskell. After all, in most programming languages, instances are actual chunks of data of some type – instantiated from class definitions with ‘constructors’ (another problematic difference in terminology.) In Haskell, they are something that “arises” (a pretty unfortunate choice of verb, if you ask me.) You don’t have to go into great detail. You just have to say something like, “If you bonked on ‘instance’, you’re not alone. What it means here is . . .”
General comments:
I got impatient with Learning a Haskell for Great Good because it’s so chatty. Too chatty by half. I’m all in favor of friendly introductions to programming languages. You’re very close to the right tone. But I think you could cut your wordcount by 10-15% and make it even more readable and approachable than it already is. Bonus: this gives you more breathing room to go into those all-important differences.