2 ms·
I agree that starting with Javascript makes sense, everyone has it in their browser. But because JS only runs in the browser you quickly run out of interesting
by gregjor 4y ago
I agree that starting with Javascript makes sense, everyone has it in their browser. But because JS only runs in the browser you quickly run out of interesting things you can do with it unless you want to throw yourself on the node/npm bonfire, which is sure to scare off beginners.
Haskell makes you think in terms of functions from the beginning (as your example illustrates). I'm sure we agree that functions represent a powerful and important core concept, but that style does not have the obviousness of "print a + b" for most people. Even children understand doing things step-by-step, in order. Most adults don't get the concept of functions right off unless they come from a mathematics background.
I don't miss BASIC (my first language as a teenager) in terms of programming languages, but I do miss having such a simple and usable tool available. I have tried to get all three of my kids interested in programming, with Python, Javascript, PHP, and none of them got hooked like I did at their age, when all I had was timeshared BASIC over a teletype. I can see their eyes glaze over as I explain how to install and start up Python and get it to do something -- the same look I get when they want to cook but not do any prep or reading recipes.
My son fell into some programming backwards by learning enough Lua to customize Minecraft. But the social/play aspects of modern computer games have, I think, turned kids away from learning programming. If you experience computers through sophisticated games from childhood, as my kids have, getting Python to print your name or add two numbers seems unimpressive.