Things Have History
C++: the language Simula made necessary and C made possible

programming-languages

C++: the language Simula made necessary and C made possible

Listen · 4:20

Bjarne Stroustrup arrived at Bell Labs in Murray Hill, New Jersey in 1979 with a specific complaint. At Cambridge, where he had spent five years on his doctorate in distributed computing, he had used Simula 67 — the Norwegian language that invented objects and classes — to model operating-system components. The models were clean, the abstractions held, and the code was a pleasure to maintain. It also ran at least ten times slower than the equivalent C code. When he switched to BCPL to recover the speed, he lost the structure. Two tools, two problems, no intersection.

Bell Labs was the right building to be annoyed in. A decade earlier, in the same corridors at Murray Hill, Dennis Ritchie had assembled C from BCPL’s bones. Stroustrup started a preprocessor in 1979 that grafted classes onto C and called it, without much ceremony, “C with Classes.” By October of that year the first implementation was running. It offered classes, basic inheritance, strong type checking, and the ability to compile the entire result down to ordinary C — meaning it ran on any machine that ran C, which by 1979 was most machines worth caring about.

Between spring 1982 and summer 1983, Stroustrup rebuilt from scratch. Cfront, the new compiler front-end, was a proper compiler rather than a preprocessor: it parsed the enriched language and emitted portable C code. It added virtual functions, operator overloading, references, the const qualifier, and new/delete operators for memory management — features derived directly from Stroustrup’s time with Simula, transplanted into C’s soil (cplusplus.com). Cfront was also self-hosting: written mostly in C with Classes itself, it compiled its own source code. A language that can compile itself is a language that has committed.

In mid-1983, a Bell Labs colleague named Rick Mascitti suggested a name for the language. “C++” — a reference to C’s increment operator, meaning, loosely, take C and advance it one step. Mascitti later admitted, when asked informally in 1992, that he had proposed the name “in a tongue-in-cheek spirit.” The language had briefly been called “C84,” a provisional name that would have dated it on arrival. Stroustrup chose the increment instead, and the name stuck (Wikipedia).

The commercial release came in October 1985, bundled with Stroustrup’s reference book, The C++ Programming Language — a deliberate move, mirroring what Ritchie and Kernighan had done for C in 1978. A language and its documentation shipped as a single artifact, the way a new instrument comes with a fingering chart. Borland’s Turbo C++ in 1990 then put a C++ compiler on a floppy disk for a hundred dollars, and that is when the language reached everyone who hadn’t yet found it.

What C++ unlocked was a pairing that had been treated as incompatible: systems-level speed alongside high-level abstraction. Every operating system, game engine, and signal-processing library that could not afford to be slow — that had to live close to hardware — now had a language that also wouldn’t punish large-scale engineering. Within a decade, most serious C compilers shipped a C++ mode alongside the standard one.

The two things Stroustrup had spent his doctorate trying to hold simultaneously — structure and speed — turned out to be what the entire field needed. Every language that followed either built on what C++ demonstrated or announced itself as an argument against it. That is the quiet definition of a milestone: not that everyone agreed with it, but that nobody could ignore it.

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.