Ask HN: Why did JavaScript win the browser?
I'm trying to understand why Javascript won the browser.
There were tens of other languages one could have added in a browser, and yet this particular one, which wasn't even an established language but a new one, ended up being implemented in browsers.
How did that happen? If you were implementing Netscape or IE back then, what was going through your mind when you sat down implementing version one?
23 comments
[ 2.8 ms ] story [ 64.6 ms ] threadSecondly, despite all the negative rants and how awful it is, JavaScript is very flexible and forgiving which is a good thing for web pages. Imagine if you get a parser error message preventing you from viewing every page that has a little error/bug/incompatible code with your JS version, etc.
What? Many autocorrect fails right here...
I blame swipe typing.
https://www.destroyallsoftware.com/talks/the-birth-and-death...
Title : THE BIRTH & DEATH OF JAVASCRIPT By : Gary Bernhardt From : PyCon 2014
[0] http://en.wikipedia.org/wiki/Brendan_Eich#Netscape_and_JavaS...
Google is trying with Dart, they already have a fork of Chromium with a VM for it[1], but it still needs to be compiled to JS to support other browsers, and to many developers that loses its appeal.
[1] https://www.dartlang.org/tools/dartium/
https://lists.webkit.org/pipermail/webkit-dev/2011-December/...
> At some point, Sweet.js ties the knot and people can write hygienic macros and extend the language.... And it’s all based on a common set of primitives and that’s the important thing. You can reason about the primitives. You can compose them. They’re compositional. They compose orthogonally. That’s the goal here. JavaScript has a lot of warts in it, but if you weed those out or deprecate them you end up with stuff that is compositional. And that’s where I think we’re heading.
Odersky: That's going to be a more fundamental rethink of what Scala is. The main goal is to make it simpler, to review it or work out what its core is, and have a very simple core on which essentially the other features of Scala can all be based. Essentially, it's a way to modularize the language better, to base the features that we know from Scala on a very, very simple core that we can compile efficiently and reason precisely about. That's the main goals for Don Giovanni.
http://www.infoworld.com/t/java-programming/scala-founder-la...
"When Netscape hired Brendan Eich in April 1995, he was told that he had 10 days to create and produce a working prototype of a programming language that would run in Netscape’s browser. Back then, the pace of Web innovation was furious, with Microsoft suddenly making the Internet the focus"
and
"[it] needed to be a silly little brother language."
It seems it was important to implement the language quickly rather than try and make it too good.
Microsoft tried to do their own language for browsers called JScript (based in JavaScript but really incompatible with the ECMAScript specification). JScript was important but the people preferred the compatibility between browsers and not the features on JScript, so they supported more the JavaScript implementation.
With this scenario, JavaScript become the unique supported programing language in the browsers. Other companies tried to create the next generation of browser-languages like Google with Dart but JavaScript is so expanded that it's practically impossible to be substituted in short-term.
http://chimera.labs.oreilly.com/books/1234000001808/pr02.htm...
See also my blog and quora.com. And HN:
https://news.ycombinator.com/item?id=1905155
Did you read the last link, the HN comment?
Update: http://javascriptjabber.com/124-jsj-the-origin-of-javascript... has more detail.
The point of all this isn't subtle. MS was coming after Netscape, copying and injecting stuff like VBScript. JS was a rush job because of this. If it had waited till Netscape 3 the odds of a VBScript mandatory single scripting language for the Web would've been high. Netscape 4 was way too late.
Only by going out in Netscape 2 did JS preempt that VBScript dystopia. Only by looking like Java did it get management support. Only by being its own language did it happen in ten days.
/be
brazilian government FML! I mean, FTW!
The lesson here is a bigger one: how new tech wins a race when it's chased by a big monster truck. Javascript got out there fast/first, looked familiar, and sidestepped conventions.
That Javascript went to ECMA for standardization, to push back on Microsoft, was a nice touch.
I guess one can't thank you enough for saving the web from VBScript!
http://javascriptjabber.com/124-jsj-the-origin-of-javascript...
and you'll see what I wanted to do absent the "make it look like Java" orders. More natural language syntax, no curly braces -- like Logo, Smalltalk, Self, HyperCard.
/be