4 ms·
Zygohistomorphic prepromorphisms[0] are a common topic of discourse among five year olds, for sure... But more seriously, I strongly disagree about Haskell bei
by coder543 8y ago
Zygohistomorphic prepromorphisms[0] are a common topic of discourse among five year olds, for sure...
But more seriously, I strongly disagree about Haskell being anything like Python is for kids.
The level of abstract reasoning that Haskell requires for more than just adding two numbers is not easy or intuitive for kids. Following step-by-step instructions is intuitive. Writing Python line-by-line is easy to understand by analogy to a list of instructions. Eventually they can start using functions when they're comfortable, but you're very unlikely to succeed in teaching a five year old about typeclasses, monads, functional purity, effect systems, or anything like that. The thing with Haskell is that you have have to know almost all of that to do anything useful from day one. Even something as simple as drawing lines on the screen.[1]
Don't be ridiculous by suggesting Haskell is just the same to five year olds as Python.
[0]: https://wiki.haskell.org/Zygohistomorphic_prepromorphisms https://wiki.haskell.org/Zygohistomorphic_prepromorphisms
[1]: https://docs.python.org/3.7/library/turtle.html https://docs.python.org/3.7/library/turtle.html
- jolux 8y agoYes, I know the jokes about zygohistomorphic prepromorphisms. How about you try explaining Python decorators and object-oriented design to a five year old? > The thing with Haskell is that you have have to know almost all of that to do anything useful from day one. Okay, then how is adding two numbers together useful? If that's Python programming then the equivalent counts as Haskell programming. You are setting a double standard for what you expect a 5 year old to be doing. Even then, tell me which of these is simpler and more clear: def double(x): return x + x double x = x + x or, perhaps let f x = x + x The point I'm making is that with regards to syntactic complexity, Haskell and Python are similar, (in fact Haskell is actually _far_ simpler) and with regards to conceptual/semantic complexity, you have to be fair in comparing them together. You do not need to understand typeclasses, monads, or effect systems to do basic Haskell programming in GHCi.
- coder543 8y agoMy suggestion is that they won't write functions, not for quite awhile. Why would they ever need to understand decorators or object oriented design to start writing code!? They can write actual code though, not just addition in some REPL. In Haskell, you do need to understand a crazy number of things to do anything. That "actual code" I mentioned can involve drawing on the screen, which as I pointed out in painstaking detail, is not going to be explainable to a five year old with Haskell code. That kind of visual feedback is incredibly important to concrete learners, which everyone is at that age. Haskell and Python are not similar with regards to "conceptual/semantic complexity." At all. I have used Haskell in the past. I understand it. Someone who hasn't reached Piaget's "formal operational" stage is not going to understand it. Piaget's theory isn't perfect, but it is normally true that people start out at a very concrete level. As I said, don't be ridiculous. Here is some super complicated Python code that kids can learn a lot from: from turtle import * color('blue') forward(200) left(90) forward(200) left(90) forward(200) left(90) forward(200) left(90) done() Eventually, they'll move on to using for loops! Or even asking the user a question and drawing something based on that. You literally have to understand (at a basic level) monads and effect systems to start implementing a question-response system in Haskell. Please, show me what my above code looks like in Haskell, since it's so comparable in complexity. I don't think you have an appreciation for what goes into learning programming. You've probably been doing it for far too long at this point, without thinking back to the early days. Why are you so defensive about Haskell in the first place?
- jolux 8y agohttps://cdsmith.wordpress.com/2011/08/16/haskell-for-kids-week-1/ https://cdsmith.wordpress.com/2011/08/16/haskell-for-kids-we... Books like The Haskell School of Expression have been teaching functional programming using simple graphics in Haskell for a long time. Need I remind you that the entire concept of a Turtle comes from Logo, which is Lisp minus parentheses?
- thrower123 8y agoWhat a terrible book that is... The Haskell School of Expression was the text for one of my early CS courses, and was a significant contributor to my bailing on a major in CS and going to something more sensical. Since then I've picked up a handful of other Haskell books, and without exception they have been far better suited to actually teaching programming.
- coder543 8y agoI never said Lisp nor Logo was a bad choice, now did I? Lisp is incredibly simple, even if it makes some things obtuse for beginners. I would rather have a strong type system like Haskell's for working on a large application, but Lisp is way easier to get started with. The parentheses are a huge stumbling point, though, which is where Logo comes in. For the record, those kids do not look like 5 year olds. Once someone is old enough to do abstract reasoning, I think Haskell might be a workable choice, if carefully taught. More often than not, it's more likely to drive them away than something simpler. That article appears to be using some web interface which was designed to hide all of the monads... I think that's a splendid way to get started. The students aren't writing their "main" function. Unfortunately, the website linked from that website is down, so it's hard for me to verify. You haven't been listening to anything I have said, so I'm going to stop. I wish you would reflect on software education, because however well-intentioned, starting with Haskell is likely to drive many more people away than it would help to show what they can accomplish and inspire them.
- jolux 8y agoSo we basically agree. You seem to have drawn from my comment that I think Haskell is some ideal language for teaching programming to babies. No. I merely said that basic math is similarly simple. I mentioned ML as well which you completely ignored, and in later comments I talked about Lisp and Logo. I was just trying to broaden the discussion to functional languages which are often passed over as teaching tools these days because they are frequently viewed as too difficult to understand or useless, when the actual genesis of CS pedagogy in children is with Logo and Lisp. Apologies if my comment was unclear.
- hannofcart 8y agoI'm a Haskell programmer. I agree that Haskell is as expressive and fosters an ease of readability like Python. But to say that you can do basic programming without understanding type classes, is taking it a bit too far. In fact, as far as teaching 5 year olds is concerned, I'd go with Lisp rather than Python.
- jolux 8y agoSure, Lisp, ML, whatever. The point is not that Haskell is the absolute best language for beginners, but that Python is not lightyears ahead of it as regards clarity and readability. I think you _can_ do basic programming without typeclasses, and even then, simple typeclasses are not hard to explain. In fact, I think Num might be easier to explain to a 5 year old than the distinction between Int and Float is.