Brendan Eich and JavaScript
Zusammenfassung
Brendan Eich created JavaScript in ten days in 1995. He designed it to look like Java, behave like Scheme, and be simple enough for non-programmers. It shipped with bugs and design decisions that would take twenty years to work around. It became the most widely deployed programming language in history, running in every web browser on earth and increasingly on servers, embedded systems, and mobile devices. Eich later became a symbol of a different kind of controversy — his forced resignation as Mozilla CEO after the disclosure of a political donation — and founded Brave Software, a privacy-focused browser company. The language he built in ten days has been running the world’s interfaces ever since.
The Netscape Brief
Brendan Eich was born on July 4, 1961, in Pittsburgh, Pennsylvania. He studied mathematics and computer science at Santa Clara University (BS 1983), worked at Silicon Graphics and MicroUnity Systems, and joined Netscape in April 1995.
Netscape Navigator was then the dominant web browser, and the web was growing rapidly. The browser could display HTML pages but had no way to make them interactive — no validation of form fields before submission, no dynamic page updates, no response to user actions. Netscape needed a scripting language that non-professional developers could embed directly in HTML pages.
The brief Eich received was internally contradictory: design a scripting language that looked like Java (to leverage Java’s marketing momentum) but was simpler and accessible to web designers and “scripters” who were not professional programmers. It should not be Java itself — that would compete with Sun’s Java applet strategy, which Netscape was also pursuing. It should look like Java but work differently.
Eich had wanted to embed Scheme — a clean, minimal dialect of Lisp — in the browser. He was overruled on the syntax requirement. He had ten days.
Design in Ten Days
Eich implemented the first JavaScript interpreter in May 1995. The language was called Mocha internally, then LiveScript, then JavaScript — the final name a marketing decision to associate it with Java’s momentum.
The language’s core design reflected Eich’s functional programming background grafted onto a Java-like syntax:
- First-class functions — functions as values, closures, higher-order functions (from Scheme)
- Prototype-based object system — objects that inherited directly from other objects, without classes (from Self, a Smalltalk variant)
- Dynamic typing — variables held any type of value
- Automatic type coercion — values converted between types automatically when operators required it
- C/Java-like syntax — curly braces, semicolons, familiar to the target audience
// JavaScript (1995) — functional roots, Java syntax
function makeCounter() {
let count = 0; // closure over count
return function() {
return ++count; // first-class function
};
}
const counter = makeCounter();
counter(); // 1
counter(); // 2
// Prototype-based inheritance (original style)
function Animal(name) { this.name = name; }
Animal.prototype.speak = function() { return this.name; };The ten-day timeline left its mark. JavaScript had:
==vs===: the==operator performed type coercion in surprising ways;===was later added for strict equalitytypeof null === "object": a bug that could not be fixed without breaking existing code- Implicit global variables: assigning to an undeclared variable created a global
thisbinding rules: context-dependent in ways that confused virtually every new JavaScript programmer
The Self Influence
JavaScript’s prototype-based object system came from Self, a programming language designed by David Ungar and Randall Smith at Xerox PARC in 1986 (its first compiler followed at Stanford in 1987). In Self, there were no classes — only objects. Objects could inherit from other objects directly. Eich found this model elegant and adopted it. The class syntax added in ES6 (2015) is syntactic sugar over prototypes; under the hood, JavaScript still uses prototypal inheritance.
Standardization and the Browser Wars
Netscape submitted JavaScript to ECMA International for standardization in 1996. The resulting standard, ECMAScript (the official name; “JavaScript” was Netscape’s trademark), was first published in June 1997. Microsoft’s implementation of the standard in Internet Explorer was JScript — compatible enough to run most JavaScript but divergent enough to require browser detection hacks.
The Browser Wars created an era of fragmented JavaScript implementations. Developers wrote if (navigator.appName == "Netscape") { ... } else { ... } to handle differences. Libraries emerged to abstract the differences: Prototype.js (2005), jQuery (2006) — which became ubiquitous specifically because it made JavaScript behavior consistent across browsers.
The founding of the Mozilla Foundation (2003) and the release of Firefox (2004) forced Internet Explorer back toward standards compliance. The V8 JavaScript engine (Google, 2008), with its just-in-time compilation, made JavaScript fast enough to run applications previously considered impractical in a browser.
Node.js (Ryan Dahl, 2009) took the V8 engine and ran it outside the browser, making JavaScript a viable server-side language. The combination of browser and server JavaScript enabled “full-stack JavaScript” development — one language everywhere.
ES6 and the Language’s Rehabilitation
ECMAScript 2015 (ES6) was the most significant revision to JavaScript since its creation, adding:
letandconst— block-scoped variable declarations, replacing the confusingvar- Arrow functions — concise syntax with lexically bound
this - Classes — class syntax over prototypes
- Modules — an official module system (replacing dozens of incompatible module patterns)
- Promises — structured asynchronous programming
- Template literals — multi-line strings with interpolation
- Destructuring — concise pattern matching on objects and arrays
ES6 transformed JavaScript from a language that professional developers used despite its quirks into one they could use with something approaching enthusiasm. The annual release cadence (ES2016, ES2017, …) continued adding features.
Mozilla, Brave, and Political Controversy
Eich co-founded the Mozilla Foundation in 2003, after Netscape was acquired by AOL, and served as CTO of Mozilla Corporation. In April 2014, he was appointed CEO. Within days, it was disclosed that he had donated $1,000 to support California’s Proposition 8 in 2008 — the ballot initiative that defined marriage as between a man and a woman. Mozilla employees publicly opposed the appointment. Three board members resigned. OkCupid displayed a message to Firefox users asking them to use a different browser. Eich resigned after eleven days.
He founded Brave Software in 2015, building a privacy-focused browser that blocked ads and trackers by default and offered a cryptocurrency-based micropayment system (Basic Attention Token) for content creators. Brave achieved significant adoption among privacy-conscious users.
Dead End: JavaScript’s Type System
JavaScript’s dynamic typing — the design decision that made it accessible to beginners — became the primary source of bugs in large JavaScript codebases. Without static types, typos in property names, wrong argument types, and null reference errors were caught only at runtime.
TypeScript as Correction
TypeScript (Microsoft, Anders Hejlsberg, 2012) added an optional static type system to JavaScript, compiling to JavaScript for deployment. TypeScript adoption grew steadily from its release and by the early 2020s had become the default choice for large JavaScript projects, with survey after survey showing majority adoption. TypeScript did not replace JavaScript — it compiled to JavaScript and was backward compatible — but it effectively acknowledged that JavaScript’s type system was insufficient for large-scale software development. Eich’s ten-day design decision required a decade-scale correction.
The full JavaScript story is covered in The JavaScript Revolution. Eich’s browser context is in The Browser Wars.
📚 Sources
- Eich, Brendan: “JavaScript at 20” — keynote transcript, JSConf US 2015
- Flanagan, David: JavaScript: The Definitive Guide (7th ed., 2020), O’Reilly Media
- ECMA International: ECMAScript 2015 Language Specification (ECMA-262, 6th ed., June 2015)
- Crockford, Douglas: JavaScript: The Good Parts (2008), O’Reilly Media
- Wirfs-Brock, Allen & Eich, Brendan: “JavaScript: The First 20 Years” — Proceedings of the ACM on Programming Languages (2020)