|
|
|
|
|
by CJefferson
2435 days ago
|
|
I have taught both Haskell and Java and there is no comparision in difficulty. Teaching basically all of the Java language can be done in a couple of days (excepting generics, which take another day or two), and the language bugs are always "shallow". Haskell on the other hand creates crazy errors which confuse students, and often require extensive teaching to understand what is going on. I'm happy to accept the possibility expert Haskell programs will be more productive in the longer term, but the learning is MUCH harder. For example, here's one "simple" haskell error: Prelude> print 2 + 3 <interactive>:9:1: error:
• No instance for (Num (IO ())) arising from a use of ‘+’ Now, it's not too hard to figure out what's gone wrong, but when doing beginning learning, explaining what (Num (IO ()))) is isn't something I want to be doing. No Java error gets that complicated. |
|
Explaining why a language can't handle print 2 + 3 is priceless.
It seems like an interesting language to learn for the sake of learning but introducing this to a beginner is not fair.