It could be, though, that showing things in concrete, and then introducing the abstractions, is the right approach to teaching Haskell for nearly everyone, not just 10-year-olds...
It could be, though, that showing things in concrete, and then introducing the abstractions, is the right approach to teaching Haskell for nearly everyone, not just 10-year-olds...
I'm curious why you think Haskell is unique in this regard.
I mean, sure, if you want to understand why things like Monads exist, I agree, that fundamentally means grokking some pretty deep abstractions.
But I don't know that you need to understand those abstractions to use and appreciate Haskell... maybe to fully use and fully appreciate it, but I wouldn't expect that of a 10 year old to begin with, in part because I wouldn't necessarily expect that of an adult either.
True, all languages require abstractions. But it seems to me that Haskell is more abstract than most. That's it's strength, in fact. But it seems to me that it also creates something of a mismatch when trying to teach it to a 10-year-old.
Higher order functions are certainly a bit trickier, but you could explain them in specific contexts (as with 'map') without needing to deal immediately in generalizations, which probably makes it a lot easier to explain.
I'm sure there aren't truckloads of evidence of beginners having problems with those concepts.
Natural language is built around all sorts of non mathematical ad hoc concepts, yet we seem to use it just fine. Of course, it might not be the best way to talk to the computer, but it is definitely "accessible."
Nah, I've attempted some real math with a tutor, I'm quite bad at math and proofs :)
No skill or background needed with such things for Haskell.
The reason programming languages exist is to simplify the language used to describe things so they can be interpreted without too much additional context and unambiguously.
I also find OO polymorphism a bit more discoverable than typeclass-based polymorphism. You can look at an OO object in the REPL and see what methods it has on it, in a way that's harder to do in Haskell.
You pay the price eventually of course - in Scala you end up needing more machinery to be able to treat "+" as a two-argument function, and you need typeclasses for certain problems so you end up having two different forms of polymorphism. But the tradeoff is that you can learn the less general version first and get started quicker, even if you end up having to learn more overall.
What's calling? What's a method? What's 5 that lets me "call" "methods" on it?
Yeah, absolutely nothing intimidating for a 10 year old there...
No different or harder than calling a function in Haskell.
> What's 5 that lets me "call" "methods" on it?
A value like any other. That's how you do everything in Scala - calling methods on values. Again, I don't see how you could reasonably claim this is any more intimidating or confusing than calling a function in Haskell.
> Yeah, absolutely nothing intimidating for a 10 year old there...
I didn't say that; just that it's less intimidating than Haskell. It doesn't introduce confusing abstraction immediately like Haskell does.
In Scala, 5 is an Int, you can click through to what an Int is and see that it has a + method on it. "Hello" is a String, you can click through to what a String is and see that it has a startsWith method on it.
In Haskell, "+" comes from a mysterious faraway place and you can see that it's "a :: Num => a -> a -> a". I do think this involves not just more symbols but genuinely more abstract concepts than the Scala version.