You're right, kinda. It's been obvious from the start that this is a bell labs venture so to speak. I love the language, and assume the likes of Pike, Thompson, and Cox to know enough to know better. Community driven languages suck, so I leave it to those much more experienced than me to make these decisions, and I'm ok with that.
As CS teacher I'm agree with others that JS is terrible choice as first language. Python is much better. Also Pascal is good option here. Even Java better than JS.
What is their goal. It seems that John Resig only wants to teach his favorite language/tool JS.
Main goal must be to teach fundamental CS concepts, programming basics, algorithms and data structures. Language choice is must to be appropriate to that goals.
He talks about teaching prototypal inheritance, is he serious? For those how have not any prior programming experience.
It seems, that he has no any prior pedagogical experience. Why that guy make such decisions and why Khan academy can't hire more experienced CS teacher.
Yes, I know, he is great guy who wrotes jQuery, but pedagogy and JS programming is two very different areas.
I think Java is a much worse choice--it's less elegant, more complicated and requires treating more concepts as magic. (You can't even write "Hello, World" without a class and a static method!)
I think Python is a worse choice because it's also more complicated and less elegant than JavaScript (and it has its own share of pitfalls), but that seems to be a minority opinion around here.
Prototypal inheritance is much simpler than classical inheritance--you don't even have to introduce the idea of a class. I think it would be easier to teach prototypal inheritance rather than classical inheritance to people with no programming experience.
The last two paragraphs of your post seem to mostly be an ad hominem.
Ok, maybe Java on some cases worse choice over JS. But Java has one preeminence over JS. With Java we can teach more advantage level of software construction. It's construction of medium/large systems. Programming in big. Using classical OOP, interfaces and specification in achieving modularity and decoupling.
JS was built for small scripts on web pages.
I think Python is a worse choice because it's also more complicated and less elegant than JavaScript (and it has its own share of pitfalls), but that seems to be a minority opinion around here.
You wrong, Python is much elegant than JS. Starting from syntax which was derived from C/C++ like languages. With a lot of bugs and confusing behaviors (some of was mentioned by Resig itself).
Code in Python is very clear and looks like pseudo-code. It's very easy to read and very easy to start writing in it.
JS - specialized language for Web. Python - general purpose language.
Prototypal inheritance is much simpler than classical inheritance--you don't even have to introduce the idea of a class. I think it would be easier to teach prototypal inheritance rather than classical inheritance to people with no programming experience.
There should be no inheritance for beginners. It's not even core CS concept. No classes, no OOP in any kind of it (prototypal, classical).
I think with this approach we will get not CS professionals. We will get JS script kiddies.
JavaScript--despite the syntax--largely takes semantics from Scheme and Self.
Python may look more elegant, but there are some hidden issues--weird variable scoping, dubious desugaring and crippled lambdas. (Also, the idea of a function as value is easier to understand with the word "function" rather than "lambda", something I would probably have changed in Scheme if using it to teach beginners.)
Moreover, Python actually shares several of JavaScript's misfeatures like weird loop scoping and the arbitrary statement/expression distinction. On top of this, Python is far more hostile to functional programming than JavaScript. (And this is by design!)
JavaScript is a much smaller language--Python has far more baked into the language itself. This is why I find Python less elegant--thing like "in" have no place in the language; they should be expressible as libraries. An elegant language is small but can be extended by its users; Python's philosophy seems to be the opposite. This is, again, where Scheme really shines.
I do not see why Java is a prerequisite to teaching "programming in big"--nothing stops you from teaching modularity and loose coupling in JavaScript. If anything it's easier because of anonymous functions and libraries built around passing functions around. (Java does have a static type system, which is an advantage, but it's a pretty bad type system.)
Also, you seem to be perpetuating the same common myths about JavaScript--it is as much a general purpose language as any and not particularly specialized for small programs or the web. It's certainly as general purpose as Python except perhaps a little lacking in some libraries. And with the advent of Node, it's quickly getting all the libraries it needs.
I completely agree! As noob who has been looking around how to teach himself, python is the easiest to understand and read at first. It doesn't have that woods of (}]$| . Also doesn't have that static class whatever that I had to mess with when starting with java. It was my first choice due to the stanford videos( which are great BTW!),but I looked for alternatives almost inmediately. Finally the best way I found is python with "learn Python the hard way".
About inheritances... O no another craizy concept I have to learn...
Prototype inheritance isn't actually very difficult for day to day use. Should all of these objects have a method attached to them? Okay, we'll add that to the prototype. Oh wait, you wanted `new Giraffe()` to be able to do all of the things that `new Mammal()` can do, plus some more? `Giraffe.prototype = new Mammal()`, done.
Oh, wait, you wanted to inherit from multiple places? That's a little harder; we'll need a for-in loop, but it's not too much code and it alerts you that you're probably Doing It Wrong. But wait, what will you do with the constructors? You don't have two `super()` functions or for that matter even one `super()` function. How do you call the last constructor? Oh yeah, that's right:
function Mammal(s, n) {
this.species = s;
this.noise = n;
}
function Pet(n) {
this.name = n;
}
function PetDog(name) {
Mammal.call(this, "Canis lupus familiaris", "Woof.");
Pet.call(this, name);
}
... you `.call(this)` it to call it on this. And now both constructors are called where and how you need them, with no confusing "super()" function that you need to teach three times to people before they get it.
Compare this to Java where the moment that you want to merge two interface declarations you find yourself opening up a new file to do it.
I mean, Java has some nice points, but its idiosyncrasies make it pure pain when you're teaching CS 101. Here I was wanting to teach kids on day one about sorting strategies with a deck of cards, culminating in quicksort: "why don't we sort black from red first, then within black sort spaces from clubs first, then within spades sort high from low first...". That works and then I want to show them what it looks like in Code and I'm suddenly all like:
"Okay, this file is named Test.java and then there is a magic line `public class Test { public static void main(String[] args) {` which is a magic incantation to appease the Java demons living inside the `javac` program, and then we have to have a Card[] and that requires another file... oh f!ck it I'll just use integers, an int[]."
All of that stuff is idiosyncrasy which stops you from Getting Work Taught. It might help with Getting Work Done in large corporate dev teams, but it does not help with Getting Work Taught to small classes of confused individuals.
But Mercurial was written in Python and performance is comparable to git. So, his argument is not correct about the performance reason on choice of C over C++. Even interpreted Python which was used in Mercurial was not speed bottleneck. Yes, I know that most of speed critical sections was written in C. But almost all project in Python.
Also Darcs was written in Haskell and Bazaar with Python.
I hate C++ too (over 10 years of experience). But Linus is full of BS too.
Yes, choice of C language in Git is right choice. But source code of Git is horrible and unmaintainable mess.
As school teacher I think that "Introduction to programming" should increase motivation on further learning of programming.
About 10-20 years ago it was very simple task. Computers and programming were very exciting.
What has changed? Nowadays there are a lot of interesting and distracting factors like computer games, TV, Internet etc.
I think our primary goal is to make learning computer science more interesting and fun. It must be more interesting than computer games and TV. It is really interesting than computer games! We just need to show that for our students.
How can we do that? For example, at our school I have made 3D robots simulator which has own simple programming language. Students are programming virtual robot to reach some goals. It's like game. Also I have made "real" robot based on Arduino with IR sensors.
As a result I can see increased interest and motivation of my students.