4 ms·
My feeling is Haskell is a bad teaching language for the same reason C++ is -- there is too much "this is some crazy stuff you have to learn about the language"
by CJefferson 9y ago
My feeling is Haskell is a bad teaching language for the same reason C++ is -- there is too much "this is some crazy stuff you have to learn about the language" early on.
One reason I have learned to love teaching Java over C++ is that the language-based bugs tend to be "shallow", at least in the first few weeks. The error messages tend to be easy to interpret, and when programs crash it is easy to understand why (how to fix it might be hard of course!)
For later year students, it's fine to expect them to learn the weirdnesses of Haskell and C++, but not for a student on day one.
- crimsonalucard 9y agoC++ isn't as crazy as the concepts in haskell.
- swift 9y agoI’d argue that you have to get pretty deep into experimental GHC language extensions to get into anything as weird as some of the SFINAE-based template metaprogramming tricks I’ve seen (and used, sadly) in C++.
- jorvi 9y agoIt's all in the approach. I've noticed most universities these days either get students started on Python or C. I believe the idea behind starting with Python is that most beginning students will hit the ground running, whereas the idea for C is that you get thrown in the deep end but will have a deeper understanding (and perhaps foundation) going forward. Which approach is better I dare not say..
- msla 9y agoC is good for teaching a simplified machine model, one with a distinction between stack and heap, pointers, and a purely sequential execution model. This is enhanced if you use it to program an Arduino or similar trivial hardware, collapsing the division between hardware and software to one piece of hardware (the single-board computer) and one piece of software (the code the student wrote) and nothing else. C, in short, gives a good way to control actual hardware without having to introduce students to the complexities of actual hardware. Python is good for teaching algorithms and OO design, precisely because it allows students to focus on the algorithm while not having to slow down the course with memory management. In both cases, the idea is clear: Only teach one hard thing at a time, and then build.
- CJefferson 9y agoI teach C as a second language. It is useful to learn from a historical perspective and because so much software is written in it, but I find it doesn't give that good understanding of machines compared to say java, and many of the problems are C specific. By "C specific" I mean reading from freed variables, or going out of bounds in arrays. These bugs are horrible to find, but also don't map cleanly to the underlying machine, because often the compiler will optimise away invalid accesses, or move them somewhere weird, meaning you can't use your understanding of the real machine to understand the C bug.
- tytytytytytytyt 9y agoI always thought it'd be a lot nicer to learn FP, without the static type system stuff, say in Erlang or Scheme, so students would be able to recognize the difference between the two.
- macintux 9y agoI always thought FP was a cool idea but I couldn’t get started. Erlang was a revelation.
- pyrale 9y ago> there is too much "this is some crazy stuff you have to learn about the language" early on. There is actually not that much crazy stuff you must learn early on. The problem with Haskell is that it's hard for beginners to know what stuff they should avoid.
- platz 9y agoyes, especially when bloggers and conference talks show off that edgy stuff. People begin to get attracted to Haskell because of those things. Things have changed a bit too over the years. I've heard of folks that burned out on haskell after wrestling with Arrows, and obscure arrow operators. Also, remember iteratees?