| I do not see Python as the natural choice for a first language. I've even had adult colleagues squint when I tried to explain decorators, or objects and all the self/static/class/method binding nonsense. OOP in Python is something I really cannot like. I teach the language to children and as soon as I get to objects (which is not avoidable in Python, as many libraries and the language itself use objects) the number of concepts I have to explain is too much and I get the dreaded blank stare. I haven't so far found a short explanation that gives them a good enough grasp on objects that they can start making their own. Ideally I would like to have to explain few orthogonal concepts, as learning a new concept in the abstract is hard and their mind has little patience for it, and let them experiment as soon as possible. But experimentation needs the minimum mastery required to combine the concepts and get some result. Pyhton's objects tend to expose their functions+struct guts, which does not help. And don't get me started on warts like the "global" keyword, which makes simple scripts with global state and a few functions (a step into learning functions and structured programming) a frustrating and buggy process. I still cannot understand async/await enough to be comfortable with it, and if Armin Ronacher doesn't either... Meanwhile, languages like Oz do concurrency, with actual parallelism, beautifully. I'm starting to think Scheme and Smalltalk would be excellent beginner languages. "Here's how to make an s-expr; these s-expr are applications, these are definitions. Now go." |
I would not expect to get to objects _properly_ (maybe things like list()) in an introduction to programming course, I think you can get very far with just functions and simple data types.
Then, once you do want to introduce objects, I think Python's class system can be kept simple enough to begin with, and the parts that are inherently tricky (like self) have equivalently tricky parts in most other languages anyway.
I think a course teaching programming that goes into async IO, needs to discuss 'global' (something I've still used only twice in 5 years of Python), talks about decorators, etc, is doing something seriously wrong.
I don't know a lot about Smalltalk, but Scheme is an interesting idea for a first language. I think it could be a good first language, but I would be concerned about what the next step is. Having learnt Python, there are lots of next steps because it has a large and active ecosystem with plenty of opportunities, I'm not sure Scheme has the same, and I feel learning a second language, while Scheme might be good preparation, is not going to be straightforward for someone who has only just learnt to code.