esc
Anthology / Yagnipedia / C++

C++

The Language That Made riclib Swear Off Both the Language and the Operating System
Technology · First observed 1985 (Bjarne Stroustrup, Bell Labs — "C with Classes," which sounds like a community college evening course and resulted in a language of approximately infinite complexity) · Severity: Traumatic (one project, one installer, one vow)

C++ is the programming language that took C — a language of elegant simplicity, sharp edges, and direct access to the machine — and added classes, templates, exceptions, multiple inheritance, operator overloading, RAII, smart pointers, move semantics, and thirty-eight years of committee decisions, producing a language so complex that no single human understands all of it and the compiler error messages read like diplomatic cables from a hostile nation.

riclib used C++ exactly once. He built a Windows installer. He swore never to use either again.

“The developer needed to copy files, write registry entries, and create a shortcut. C++ required three header files, a COM interface, a base class hierarchy, and a linker error that could not be explained to a civilian.”
The Lizard, who installs things by copying a binary

The Installer

The project was simple: build a Windows installer. An installer copies files to a directory, writes some registry entries, optionally creates a Start Menu shortcut, and exits. This is a list of four tasks. In Delphi, this was an afternoon. In Go, this would be a single file. In C++, this was a descent into a complexity so disproportionate to the task that the task itself became irrelevant and the fight with the language became the project.

The Windows installer APIs of the era required COM interfaces. COM interfaces required base classes. Base classes required header files. Header files included other header files. The template system produced error messages that were longer than the code that triggered them. The linker produced symbol names so mangled by the C++ name decoration scheme that they bore no recognisable relationship to the function they referred to. The entire experience was the programming equivalent of being asked to hang a picture and being handed a structural engineering certification program.

The installer shipped. It worked. It copied files and wrote registry entries and created a shortcut, which was all it ever needed to do. But the ratio of effort to outcome — the sheer volume of C++ ceremony required to accomplish something that should have been simple — produced a reaction that was less “I don’t prefer this language” and more “I am never doing this again.”

The vow was made. The vow was kept. C++ was not used again. Windows, by association, was not used again as a development platform. The installer was the last thing riclib built for Windows and the last thing riclib built in C++, and both of these facts remain true decades later.

The Contrast

The installer experience crystallised something that Z80 Assembly had hinted at and Delphi had confirmed: the relationship between language complexity and programmer productivity is not linear. More features do not produce more results. More abstraction does not produce more clarity. C++ offered everything — every paradigm, every feature, every mechanism the committee could design — and the result was a language where copying a file required understanding template metaprogramming and COM interfaces.

Delphi, which riclib had already fallen in love with, built installers in an afternoon. Go, which would arrive decades later, would build one in a single file. C++ built one in a week of fighting the language, and the fight was not with the problem. The fight was with C++.

This is the pattern that riclib would see repeated throughout a career: the languages that try to give you everything end up taking everything — your time, your patience, your confidence that the task is achievable. The languages that constrain you — Pascal’s structure, Delphi’s components, Go’s enforced simplicity — let you build things, because the language is not in the way.

C++ was the proof. One project. One installer. One vow. Kept.

Measured Characteristics

See Also