Programming Languages and Learning
quorumlanguage.com
quorumlanguage.com
I was considering Haskell as a language, but unfortunately Haskell often feels like it gets in the way of your learning sometime. Want to teach for-loops for instance, well you gotta break out Monads.
Python is a popular choice, but I think it's a horrible pedagogical language. I don't want to teach OO concepts, instead I rather have him think about the algorithm and basic computer science principles. The only reason I think people choose Python is that it's super easy to get started, but I think all that simplicity is just a wrapper around a fairly complex runtime. With Julia the abstractions are generic enough that they can stay as abstractions. With Python, I'd feel like I'm just teaching a package (i.e. numpy) and the concept of generic programming would just get ignored.
Does python really force this? I can see this being the with java -- a language often used in intro to CS courses.
I've personally had interviewers frustrated that I solve problems correctly so much faster than they expected. And not only correctly, but to the point where I could type what I wrote verbatim into the interpreter and prove that it actually works.
But with someone to guide you, it absolutely can be the best first language, because of the breadth of programming concepts it introduces you to. Python is a good first language if, say, you're in college and just want to get started with doing things in programming - where the focus is on programming as a tool to get the results you want, and less so on the shape of the tool itself and how it shapes your mind. At younger ages, when there's time to lay a firm foundation and explore the tool itself, Julia makes for a much better foundation, being a better jumping-off point for many more diverse paths in the programming landscape.
Something like this occurred to me when I learned Javascript. Python is so easy initially, but its interesting how the CS principles of it are not so easy.
I think this popular cause someone with a CS background can quickly get the ideas of variables and printing to terminal, but look at how javascript vs Python handle objects.
Javascript it is just setting a variable to a bracket of values, like an array. Python you have to tackle concepts like what a class and self are.
Not saying Python is better/worse than any other for learning, but I am certain its popularity for beginners is how easy you can go from 0 to something. Not how easy it is to learn CS and programming principles.
Python objects are pretty much the same thing under the hood. Though the OP mentions that, surprisingly, static type systems are easier to work with than dynamic ones, so perhaps we should really be considering Python with type annotations and TypeScript.
I really dislike Python as a teaching language because students can leave a course without really knowing much about computation itself. They might know how to "make Python do a thing", but they don't leave with an appreciation of computation itself. The details of memory models, cache levels, AVX, distributed computing, etc. are just a whole different universe and students have to almost relearn from scratch with a new model if they want to advance. Things like Bjarne's "Why you should avoid linked lists" (https://www.youtube.com/watch?v=YQs6IC-vgmo) are incomprehensible to the programming model provided in the Python universe: it has a better O(n) so why would it be worse? While you always need to make simplifications while teaching, I believe that starting people on Python goes a bit too far and sooner or later they have to unlearn bad habits or relearn a new programming model.
I believe it's much easier for students to learn something explicit and then later say "yeah Python automates the heap allocation of objects by boxing like this, and from what you have already learned, that's obviously slow which is why the language has overhead but it's pretty nice ain't it?"
As for where I would point to regarding sensible language design, read http://worrydream.com/LearnableProgramming/ and the book recommended within, Mindstorms. I believe programming has the potential to be the emancipatory medium of thought in the coming century, but only if we can rethink what programming really is.
[0] https://kilthub.cmu.edu/articles/Six_Learning_Barriers_in_En...
This is too broad a goal. Novices shouldn’t be required to learn expert languages, and experts shouldn’t be limited to using only novice-friendly languages. Because we who specialize will spend most of our careers as experts, it’s crucial that we still have clear, concise, powerful languages available even though they require more investment that wouldn’t pay off for everyone else.
And here we have it folks, static typing is superior.