JavaScript — Ten Days that Ate the World

Headline

Brendan Eich created JavaScript at Netscape starting April 1995 (Wikipedia: Brendan Eich). He wanted to put Scheme in the browser; his managers wanted Java-like syntax; he combined “much of the functionality of Scheme, the object-orientation of Self, the syntax of Java” and completed the first version in ten days. Named Mocha → LiveScript → JavaScript. Shipped in the Navigator 2.0 beta (September 1995; 2.0 final January 1996 — corrected 17 Sep 2026). Standardized as ECMAScript 1 (June 1997).

The three ideas that shaped everything

  • Prototype-based objects (from Self). No classes required. Objects delegate to other objects.
  • First-class functions with closures (from Scheme). The one Lisp idea that reached the world at scale.
  • The event loop. Single-threaded, non-blocking I/O, callback-driven. Later formalized as Promises (ES2015) and async/await (ES2017).

What JavaScript got wrong (mostly by accident)

  • Type coercion. [] + {}, NaN === NaN, the whole == versus === saga.
  • var scoping. Function-scoped, hoisted, undefined. ES6 let/const fixed it 20 years later.
  • this. Dynamic binding based on call syntax. Arrow functions fixed it 20 years later.
  • Standardization by feature accretion. ES4 was killed; ES5 was a compromise; ES6/ES2015 was the reset.

What JavaScript got right (in retrospect)

  • Ubiquity. Every browser, every OS, every device. The only language you can rely on being installed everywhere.
  • npm. The world’s largest package registry. Also the world’s most-attacked package registry (see q17-package-management-and-supply-chain, d30-supply-chain-security).
  • The Node.js runtime. V8 outside the browser gave JavaScript a viable server story.
  • TypeScript. Microsoft’s optional-static-types layer became the way large teams ship JavaScript. Proof that a bolt-on type system can succeed if it stays out of the way.

What Mo takes

  • Async as language-level. async/await was JavaScript’s best late addition; structured concurrency (d12-concurrency-at-the-edges) is Mo’s version.

  • TypeScript’s lessons. Gradual typing on top of a dynamic core teaches Mo what static types must do to feel ergonomic to agents.

  • The event-loop model as one option among many. Mo will not commit to a single concurrency model at the language level; capabilities can select runtimes.

    17 Sep 2026: it did commit — isolated processes with bounded mailboxes and a deadline on every wait (d14, d33).

What Mo refuses

The lasting lesson

JavaScript is the “worse is better” language par excellence. Every serious language designer would have made different choices; ubiquity made them irrelevant. But it is also the direct source of the modern supply-chain-attack pattern — package registries as attack surface — that Mo’s design treats as an existential threat.

Ten days of language design became 30 years of consequence. Move slowly.

Sources