tl;dr - they picked JS due to its "ubiquity, desirability in the larger workforce, lack of prior installation requirements, and ability to create something that's easy to share with friends"
I find that explanation disturbing. Why not start from a language that teaches the basics of the common programming paradigms, such as OOP (Java) or FP (Scheme)?
You may have a different perspective, but if I wanted to teach OOP to new programmers, Java would be the last language I would consider, not the first. It’s a fine language in a vocational setting where the objective is to graduate people for employment as Java programmers, of course.
Scheme is elegant and small, and a traditional choice for teaching programming where functions are first-class objects. If you consider Scheme appropriate for FP, my guess is that you’d also consider SmallTalk appropriate for teaching OOP.
Agree with your opinion on Java/OOP. There do seem to be better places to start IMHO.
If you had to pick one language to teach people who had never programmed before and you wanted to be able to demonstrate the basics of OOP, FP and other styles, then Python would be a good choice.
I think Python is actually a pretty bad choice for function programming. It does ostensibly support it, but in practice I don't think anybody uses anything resembling purely functional style. For example, I don't think I've seen a single fold in the wild in Python where I see them in Haskell and Scheme all the time.
Could you imagine only introducing mutation halfway through the semester of a Python course? That's what my intro CS course did with Scheme, and it was perfectly natural and effective. Scheme also makes it very easy to see mutation as something different from definition--it has both define and set! which do different things. Python doesn't even differentiate between the two because it has a weird scoping model.
Of course, Scheme itself isn't a perfect functional language either. I found that pattern matching is extremely important--Haskell, mostly thanks to pattern matching, helped me internalize recursion much more than Scheme when I was learning the two concurrently.
Scheme is also a good language to teach about OOP because it divorces the OO part from the language itself. When I had learned about it in Java, I had assumed that an object system was inherent in a language. Scheme showed me that a very expressive OO system could be written on top of a language without the language supporting it in syntax.
Finally, it is very easy to adapt Scheme syntax to other paradigms. Could you reasonably write a logic programming language that looked like Python? I honestly don't know. On the other hand, making one like Scheme is trivial. Not only did we use a language like that in the same intro course, but we actually went over how to implement it.
Ultimately, I think Python is too complicated. Not in terms of being difficult to use, but in terms of just being a ton of different features put together. They may look similar, but they are still discrete ideas that do not naturally come from each other. Scheme, on the other hand, has a few core ideas and everything else is built from those. Just compare the grammars of the two languages to see what I mean.
I agree with a lot of what you say, and I'm not qualified to comment on some of the the other things you say.
My point was that if you were to teach people new to programming just one language then Python might be a good choice because it supports many paradigms.
I agree there are languages that are much more conducive to learning functional programming than Python.
> Why not start from a language that teaches the basics of the common programming paradigms, such as OOP (Java) or FP (Scheme)?
Because that stuff is boring and it drives away a bunch of people who might really get in to programming if there wasn't a huge gap between "just starting" and "doing anything remotely cool".
I for one would not have become a developer if my first experience with programming was a typical "CS101: Let's spend 3 months learning about loops" class, which unfortunately is many students first introduction. This class alone probably drives away half of the people who were interested in programming enough to take the class in the first place, which I find disturbing.
I spent a bunch of my free time as a kid making (really bad) web pages, (really bad) Javascript, and (really bad) PHP. Did I understand OOP, or how/why it's different than FP? Heck no. It wasn't until years later that I even took a programming course. But by the time I was ready to learn solid programming fundamentals, I'd already been bitten by the programming bug.
If I had to guess, I'd say this class is more about getting people interested in programming than it is intended to teach everything you Should Know. IMO, that's what a beginner course on any heavy material should be anyway.
Then the problem is the course, not the language. Logo and Scheme are both lisp derivatives. Logo let people make things that were cool. There's no reason you couldn't do the same with scheme, but just giving them some higher order functions early on that display graphics. Later on people can decompose those functions.
The beauty of scheme is that it's turtles all the way down. If you want to see how something works, it's easier to explore.
As every PHP programmer knows today, and all of us Applesoft BASIC and Apple Pascal programmers knew when we were beginners, OOP and FP are unnecessary stumbling blocks between a new programmer and a very large class of fun computer programs.
for new programmers, the entry barrier for those languages is significantly greater than javascript. people don't quit learning programming because they're not learning OOP- they quit because it's inaccessible.
Agreed. I also think that the reason a lot of us stuck with programming was because we loved the feeling of making something fun that we could play with. This is arguably a lot easier to do from the start with JavaScript than with Java or Python because one of the main applications of JavaScript is visual manipulation. Generally the first Java or Python programs you make are used from the command line. I think that when someone's starting out with something like programming, you want to put fun before "educational value" (correct OOP design principles) to give them that itch.
Let them quit. Many of us learned to program before the commercial Internet existed and at a time when desktop computers were not found in every home. If someone finds learning to programming to be "inaccessible" now then I rather that they not join our industry.
Ability to create something you can share (or that you can other wise readily "put to use") is important. If you lose your audience because they don't get satisfaction early enough, well, they are gone. While programmers certainly want to weigh in on the issue (obviously), the experience of teachers and psychologists would suggest that keeping the carrot close is immensely valuable to getting someone to learn something.
I would prefer to err on the side of not using OOP at all for the first year or so. The problems it solves have better solutions if you're not using a terrible language. They also seem extremely contrived when you introduce them long before the students have any chance of producing a program with those problems, so the students frequently end up using OOP all the time when it's not really called for.
Java seems extremely mutilated compared to other languages, why would it seem like a good choice? There are only few concepts you could teach with Java.
I find that explanation disturbing. Why not start from a language that teaches the basics of the common programming paradigms, such as OOP (Java) or FP (Scheme)?