Things Have History
JavaScript: the language that lied about its name

programming-languages

JavaScript: the language that lied about its name

Listen · 3:29

Brendan Eich arrived at Netscape Communications in April 1995 to embed the Scheme programming language into the browser. Management had other ideas. Within weeks the brief had changed: build something that looks like Java. He had ten days in May to produce a prototype. He called it Mocha.

Netscape’s Navigator held roughly 80 percent of the browser market in 1995, and the web it served was almost entirely static — pages that sat there and waited for you to click to a different one. Marc Andreessen, the company’s co-founder, wanted pages that could respond. Java, Sun Microsystems’ new object-oriented language, was the technology moment of the year — but Java required compilation, a virtual machine, and developers who knew what they were doing. Netscape needed something lighter, something a web designer could pick up without a computer science degree. A glue language, they called it.

Eich spent ten days building Mocha, shipped it as LiveScript in Navigator 2.0’s September 1995 beta, and called it done — or close enough. Under its Java-inflected surface, he had embedded something far stranger: the first-class functions of Scheme, meaning functions you can store and pass around like any other value, and the prototype-based object model of Self, where objects inherit directly from other objects rather than from class blueprints (Auth0). Eich later described the result as “a premature lovechild of Scheme and Self, with Java looks.” The looks were required. The rest was improvisation.

The name JavaScript was decided in December 1995, not by Eich but by a deal between Netscape and Sun Microsystems. Netscape would bundle Java in Navigator; Sun would let Netscape call its scripting language JavaScript. On December 4, the two companies held a joint press conference to make it official. Eich later characterized the name as “a marketing ploy by Netscape” — a way to borrow Java’s popularity for a language that shares Java’s curly braces and little else (Wikipedia). Java is statically typed, compiled, and enterprise-grade. JavaScript was dynamically typed, interpreted, and built in ten days. The resemblance is skin-deep and intentional.

The ten-day sprint was a prototype; the real work stretched through the summer before Navigator 2.0 shipped. But the core decisions — prototype chains, first-class functions, dynamic typing — were locked in that first week and a half, and they were never changed. What looked like a rush job turned out to contain a genuinely expressive core (History of the Web). The industry spent a decade misunderstanding it, another decade building frameworks to paper over the parts it disliked, and arrived eventually at using it largely as designed.

A language built to be Java’s easy companion ended up as the only programming language every browser has ever agreed to run natively. Netscape wanted a glue language. What Eich gave them in those ten days is the one thing the web never figured out how to replace.

Sources

Spot a mistake?

Wrong date, broken citation, a fact that doesn't hold? Tell us. It lands in an inbox a human reads and the post can be pulled or corrected.