Java was a colossal failure...JavaScript is succeeding because it works
jaxenter.com
jaxenter.com
My belief is that JavaScript is succeeding because it appeared weak enough to sneak into all the browsers everywhere. The very fact that no-one took it seriously meant that no vendor had a reason to remove it. Apple thought Flash was a threat, so they removed it, but they left JavaScript in.
Then came a time of programmer maturity and open-mindedness. Functional and dynamic paradigms had a chance to take hold. JavaScript, it turns out, is a language with some structural beauty hidden behind a few (mostly superficial) glaring problems.
But the single biggest thing that JavaScript gives us over and above Java is true openness! There never was, and there never will be, a jsfiddle for Swing. The "installation" procedure for JavaScript programs is...clicking a link. I'd argue that the tooling for JavaScript is in some ways even better than for Java: for debugging UI, give me a developer console and webkit inspector over Eclipse any day.
It remains to be seen whether JavaScript will be the language of the server. I'm very excited by new tools that span the client/server divide, particularly Meteor (which is built on node). People always want to know if I'm a front- or a back-end programmer, and the answer has always been "both" although I've never been content with a) the language divide or b) server-rendered HTML. Single page apps, dynamic JSON data-structures all the way through the stack, and reactive programming is like a little slice of heaven.
The interesting problem with Meteor is coming up with a way to recover that jsfiddle magic for the server-side pieces. Which is something I'm working on.
http://www.youtube.com/watch?v=Trurfqh_6fQ
As for Apple not seeing JavaScript as a threat... that's quite the understatement. Everyone seems to have forgotten that Steve Jobs actually went on stage and declared that Web Apps were the way you would develop apps for the iPhone, in 100% JavaScript. This was almost a year before the App Store and the Cocoa Touch SDK. Nobody really believed him at the time, but it was in line with what they'd been doing.
If you look at Safari's evolution on the desktop, there was a ridiculous performance boost with Safari 3. Incidentally, this was during the same time they would've been developing the iPhone's browser. At the same time they started doing things like CSS animations, CSS transitions, CSS 3D (which was first available on iOS, not on the desktop), all technologies that are required to bring an Apple/Cocoa-like experience to web apps. That's not a coincidence.
Someone who worked at Apple told me that, in fact, Steve Jobs wasn't entirely lying. They did believe web apps were the future. But they simply couldn't deliver on it, and even today, native mobile apps still have a huge lead over web.
Did Java live up to every ambition that Sun had for it? No, of course not. Did it "fail" in certain niches, by some standard? Yes. But given it's widespread popularity and extensive use to this day, calling Java a "colossal failure" is as ridiculous as calling an M1A1 Abrams tank a sports car.
Through Java Applets, Sun associated the Java logo with "my browser freezes for 10+ seconds". How nobody thought that was a colossal problem, I still don't understand.
My mom knows what Javascript is and does care about it.
Let's get out of the habit of this casual ageism and sexism, OK?
Let's get out of the habit of being a a bunch of uptight curmudgeons about every little thing on the internet, OK?
I'm not being uptight about "every little thing on the internet", I'm saying that in this specific way our language ought to evolve.