A company called Netscape was founded in 1994 and created one of the first web browsers. They recruited Eich in 1995, because they wanted him to create a programming language for that web browser. The lure for him was that he would be able to base the language on Scheme (a Lisp dialect). Scheme’s influence led to JavaScript having closures. Another influence was the prototype-based programming language Self which is responsible for JavaScript’s prototypal inheritance (some of the elegance of this approach is hidden by JavaScript’s muddled adoption of it). Next, Java got included in the browser. It quickly gained popularity and influenced Netscape’s decisions regarding JavaScript. For example, its name:
Question by interviewer: As I understand it, JavaScript started out as Mocha, then became LiveScript and then became JavaScript when Netscape and Sun got together. But it actually has nothing to do with Java or not much to do with it, correct?Eich explained why Netscape thought two languages were needed, instead of just Java, and why JavaScript is embedded in HTML.Eich’s answer: That’s right. It was all within six months from May till December (1995) that it was Mocha and then LiveScript. And then in early December, Netscape and Sun did a license agreement and it became JavaScript. [2]
We aimed to provide a “glue language” for the Web designers and part time programmers who were building Web content from components such as images, plugins, and Java applets. We saw Java as the “component language” used by higher-priced programmers, where the glue programmers – the Web page designers – would assemble components and automate their interactions using JS. [3]Netscape management also decided that JavaScript’s syntax had to look like Java’s. That ruled out adopting existing scripting languages such as Perl, Python, TCL and Scheme.
Eich blames some of JavaScript’s idiosynchracies on having had to finish a prototype quickly, which subsequently was changed little before being deployed. His favorite JavaScript features [4] are:
- First-class functions
- Closures
- Prototypes
- Object literals and array literals
5 comments:
JavaScript: how it all began.
Netscape invented it.
IE copied it but called it JScript for legal reasons.
Everybody else copied it and keeped the name as JavaScript.
IE invented VBScript.
Nobody else used VBScript for legal reasons.
Netscape sold to AOL.
AOL ended Netscape.
Ex-Netscape employees moved to Firefox, SeaMonkey, Chrome etc.
Give credit where it's due, though.
Netscape's Javascript didn't do a thing. Innovation came from MS's DOM manipulation and later on XHR (among other things) - doesn't mean they didn't do anything, just that they didn't invent the Javascript we all know about today.
Such a stupid move. Either of those existing scripting languages would be much better. Imagine Python or Perl instead of JS. World would be a nicer place to live in. Seems to me Web development is just a result from series of bad decisions.
That's just because you don't understand javascript.
Me, on the other hand, use javascript as well as some python and a perl derivative daily, and I can assure you the world would have been a messier place with perl or python instead of javascript.
There reason is that javascript is easily contained, unlike python and perl, which are made to run as free as possible.
I partially agree (love Python, not too fond of Perl). But JavaScript does grow on you! Take the time to get to know it: Read Crockford’s “JavaScript the Good Parts”, watch his talks on JavaScript [1] (which cover the same ground as the book), or read my JavaScript posts [2]. At its core, JavaScript is a nice language, but you have to make peace with its quirks (of which there are a few).
The future of JavaScript looks really bright [3], it is moving forward quickly and expressly borrowing from Python. Furthermore, server-side JS is gaining traction with node.js, so you can use a single language for both client and server.
[1] http://developer.yahoo.com/yui/theater/
[2] http://www.2ality.com/search/label/javascript
[3] http://www.2ality.com/2011/01/brendan-eichs-dream-for-next-version-of.html
Post a Comment