So the idea was to make Java available for big, professional, component programmers; while Mocha would be used for small scripting tasks.
There was a lot of internal pressure to pick one language as soon as possible. Python, Tcl, Scheme itself were all possible candidates. So Eich had to work fast. Lots of important decisions had to be made and very little time was available to make them.
In a matter of weeks a working prototype of Mocha was functional, and so it was ready to integrate with Netscape Navigator.
Furthermore, when used together with their LiveWire application server product, it would enable isomorphic development, with the same language used on both client and server.
In web development, an isomorphic application is one whose code can run both in the server and the client.
If this sounds familiar, it is because this was exactly what Sun Microsystems was attempting to pull off with Java.
What was meant to be a Scheme for the browser turned into something very different. The pressure to close the deal with Sun Microsystems and make Mocha a scripting companion to Java forced Eich’s hand.
A Java-like syntax was required, and familiar semantics for many common idioms was also adopted. So Mocha was not like Scheme at all.
Mocha now LiveScript
The prototype of Mocha was integrated into Netscape Navigator in May 1995. In short time, it was renamed to LiveScript. At the moment, the word “live” was convenient from a marketing point of view.
In late 1995, when Microsoft cottoned-on to the competitive threat the web posed, the Internet Explorer project was started in an all-out attempt to wrestle control of the emerging platform from Netscape.
Slight differences in implementation, in particular with regards to certain DOM functions, caused ripples that would still be felt many years into the future.
The first version of JScript was included with Internet Explorer 3.0, released in August 1996.
Designing a language is a challenge, but also an opportunity. Programming languages can express old ideas in new ways, and popularize alternative approaches.
Eich had read Structure and Interpretation of Computer Programs, a landmark MIT textbook, featuring the language Scheme, which combines a minimalist feature set with surprising power and flexibility – it does a lot with little.
Netscape recruited Eich to implement “Scheme for the browser,” then gave him a contradictory stipulation: whatever he came up with had to “look like Java.”