Things Have History

programming-languages

Plankalkül, or how to invent a programming language during an air raid

Listen

In February 1945, Allied bombers were leveling Berlin block by block. Konrad Zuse loaded the partially assembled Z4 computer — a cabinet of telephone relays roughly the size of a wardrobe — onto a truck and drove south. His workshop on Methfesselstraße 7 was already rubble. His parents’ flat, which had housed the Z1 and Z2, was rubble. The Z3, the first fully operational stored-program electromechanical computer, was rubble. Zuse drove anyway, first to Göttingen, then to the Alpine village of Hinterstein in Bavaria, where he settled into a farmhouse and kept writing.

The manuscript he carried with him was called Plankalkül — “Plan Calculus” in German — and it was the first high-level programming language ever designed. He had started drafting it in 1942, after running into the obvious problem that writing programs for the Z3 in binary machine code was an exercise in misery. Every instruction had to be specified as a stream of ones and zeros on punched film strip. The Z3 itself was brilliant. Communicating with it was not.

What Zuse designed in response was remarkable for 1945. Plankalkül had for-loops, while-loops, conditionals, floating-point arithmetic, arrays, tuples, and hierarchical record types — the kind of structured data that most languages would not manage for another decade. Its primitive data type was a single bit. It also introduced what Zuse called the “yields-sign,” the symbol ⇒, for assignment — because mathematics had no existing symbol for the act of giving a variable a new value, so he invented one.

To show that the language could do something real, Zuse wrote a chess program in it. Not a sketch — a complete program for evaluating board positions, with defined types for coordinates, piece identities, and game states. It is the first program in history built on a layered type system. Ada Lovelace’s Bernoulli-number algorithm from 1843 had been twenty-five sequential operations; Zuse’s chess engine had architecture.

The manuscript went nowhere. Zuse published a short excerpt in the Archiv der Mathematik in 1948, which attracted essentially no response. The full document remained unpublished until 1972. The first working compiler for Plankalkül — by Joachim Hohmann, as a dissertation at Berlin’s Free University — appeared in 1975, thirty years after the language was designed.

When ALGOL 58 was developed in the late 1950s, its designers did not credit Plankalkül. Zuse was irritated by this for decades. Heinz Rutishauser, one of ALGOL’s designers, later wrote that Zuse’s work “never attained the consideration it deserved.” It is the polite version of an admission that the field had ignored its own starting point.

The Z4 that survived the truck ride south had a better outcome. Repaired and completed in postwar Bavaria, it became the only functioning computer on the European continent and was installed at ETH Zurich in 1950. Every language that followed Plankalkül — Fortran, Lisp, COBOL, eventually Python and everything after — inherited the assumption Zuse had made in a Bavarian farmhouse in 1945: that it was worth building a human notation for machine instructions, separate from the machine itself.

That separation is the entire field of programming language design. Zuse arrived there first.

Sources

  • Plankalkül — Wikipedia — Design timeline 1942–45, language features (loops, types, assignment operator), publication history 1948/1972, Hohmann’s 1975 compiler, ALGOL acknowledgment controversy.
  • Konrad Zuse — Wikipedia — Wartime displacement, destruction of workshop on Methfesselstraße 7, Z3 and Z4 specifications, evacuation route to Hinterstein.
  • Konrad Zuse — Computer History Museum — Z4 as first commercial computer, ETH Zurich installation in 1950, postwar trajectory.