How about just learning Python instead of learning a toy language and then having to learn Python anyway?
How about just learning Python instead of learning a toy language and then having to learn Python anyway?
What sets the PLTgroup apart, in my mind, is that it tends to row in the same direction at the low level. This has allowed it to create a robust platform upon which tools (particularly in the form of languages) can be built. Pyret is an example of this. Adding a language with the offside rule to the ecosystem doesn't cause anyone offense or raging flame wars or fuck-you forking. Imagine a PEP to add Lisp syntax to Python.
Instead, Pyret just gets rolled up into the pedagogy that is described in How To Design Programs because Pyret fits with the philosophy of building teaching languages for the purposes of teaching. Other PLTgroup languages range from Beginning Student Language (a simplified lisp) up through Racklog (a lisp implementation of Prolog's logic programming model) and pure insanity like Scribble which introduces a documentation phase to the compilation. Racket even ships with an Algol60 implementation.
At the core, the important philosophical idea is that learning programming is not learning a language. In the age of Googling into StackOverflow, that's even more the case as far as I can see.
Python's use of semantic white space in the form of indentation is sometimes referred to as the 'offside rule'.
But I see your point and I did struggle with whether to include it or not. I think me wanting to share the great work I see Shriram Krishnamurthi (https://cs.brown.edu/~sk/) and others (Matthias Felleisen, http://www.ccs.neu.edu/home/matthias/ for another example) are doing and have been doing for decades to advance Computer Science education and really tackle the tough problems pushed me to include it in the end.
I'm just a fan of their work and this post felt like a great time to mention it.
However, I do share your feelings that most people should just jump in and learn Python as their first language. It's easy to get started, batteries included and there's plenty of resources and people to help them if they get stuck.
Python used to be easy to learn. It isn't anymore. It may be a better language for all the feature additions, but it isn't easy to learn anymore and I no longer recommend it for that purpose. (I don't have a recommendation at the moment.)
Compared to C++, C# and Java, Python is still MUCH easier to learn. Python and Ruby are the easier languages to learn. I have to agree with the other commenter, why learn a toy language only to later have to learn a real one? That is a waste of time.
I also agree with you that math, CS and science education is really messed up, especially in my country.
Here's an old gem of a talk from a fantastic CS educator, https://www.youtube.com/watch?v=efhh0Cf6sT8, that I found some years ago.
Curricula in Pyret focus on building games using concepts from math, or interactive simulations using concepts from physics, or data analyses using concepts from working with spreadsheets.
I agree that a purely "CS concepts"-based approach is dry and ineffective for a huge portion of students. That's why applications are so critical, and why we build things like tables (https://twitter.com/PyretLang/status/773605473824145408) into the language, so we can give students real-world tasks to do right away.
We happen to also have carefully designed the language to allow us to teach these applications along with a rigorous programming style. Students write _examples_ that get them ready to understand automated testing, they write _contracts_ that teach them about type-based interfaces, they write _data definitions_ that teach them about structured data, and so on. But it's always in service of an application.
So I very much agree that a purely "bottom up" CS-concepts-only approach has issues.
Also, Python may feel like a small language at times, but it is really quite large and complex. This can be seem by imagining a beginners perspective when Googling for help with a simple list operation. The inevitable Stack Overflow answer will almost certainly use a comprehension. I would argue that Pyret is actually fundamentally less complex than than Python.
As always, the biggest issues are your goals, constraints, and resources. If you can afford to spend time in a language optimized for education, that is fantastic. If you can't afford that time, python starts to look like a good trade off relative to the languages with reasonable job prospects.
* It doesn't make me an expert, but I do teach programming for a living. We use happily use python for introductory content and server-side web content, but I can easily see Pyret as a great option for an educational offering with different constraints than mine.
I also teach programming for a living, and, for instance, I usually have a hard time explaining to students what a for loop over a range() means for having a index. The problem is that there are a lot of things going on behind a for-each (which is what the for loop on Python does) and it is hard to explain that to newcomers. On the other hand, for loops in languages like C are simpler to explain to newcomers, as there isn't much hidden from you, and you don't have many alternatives for iterating on an array.
I would say that the higher-level benefits of Python are best understood when you have some experience with lower-level languages such as C/C++ or Java. For students, if they have time, I would say that they would benefit pedagogically by learning a simpler language with less functionalities. If not, I would say learn Python, but expect to not understand everything at first.
there are no stupid questions on #python on freenode IRC, and many many helpful people to answer questions in realtime