Zum Inhalt springen

The Compiler Nobody Believed Would Work

Zusammenfassung

When John Backus proposed building a compiler for the FORTRAN language in 1953, his colleagues at IBM were skeptical to the point of dismissal. The prevailing belief among experienced programmers was that no compiler could produce machine code as efficient as a skilled human programmer writing assembly by hand. The first FORTRAN compiler, delivered in April 1957 after three years of work, produced code so close to hand-optimized assembly that skeptics had no credible argument left. It was the moment that proved abstraction — programming in human-readable notation rather than machine instruction — was not only possible but practical.

The State of Programming in 1953

In 1953, programming a computer meant writing sequences of numeric codes that corresponded to specific machine instructions: move this value to that register, add these two registers, jump to this address if the result is zero. The process was error-prone, time-consuming, and required intimate knowledge of the specific machine’s architecture. Assemblers — programs that translated mnemonic codes like ADD into numeric opcodes — existed and were used, but they did not abstract away the architecture. A program written for an IBM 701 could not run on an IBM 650 without complete rewriting.

The idea of a higher-level language — one that let a programmer write X = A + B * C and have the computer translate it into correct machine instructions — had been discussed theoretically. Grace Hopper had built A-0 (1952), a simple translator that substituted pre-written subroutines. But nothing had attempted to translate arithmetic expressions into optimized machine code automatically.

The skepticism was not irrational. The best programmers of the era were extraordinarily skilled at writing tight assembly code. They used tricks, shortcuts, and architectural knowledge that a mechanical translation process could not replicate. The assumption was that a compiler would produce code that was 5× or 10× slower than hand-written code — and in that case, the abstraction would cost too much to be practical.

Backus and the IBM 704

John Backus joined IBM in 1950 and had spent years writing machine-code programs for the IBM 701 and 704. He understood the argument against compilers from personal experience — he also understood the inefficiency of requiring every programmer to master machine code to get anything done. He proposed the FORTRAN project to IBM management in 1953.

The name stood for FORmula TRANslation — the core problem was translating mathematical formulas into machine instructions. Backus assembled a team of approximately 13 people and began work in 1954 on a compiler for the IBM 704.

The 704 was a significant target. It had three index registers, floating-point hardware, and a reputation as a difficult machine to program efficiently. Its hardware divide instruction and floating-point operations were fast, but using them correctly required careful register management. A compiler that generated code for the 704 would need to be genuinely clever to come close to hand-written efficiency.

The Result

The first complete FORTRAN compiler was delivered to IBM customers in April 1957. The 704 Reference Manual described it as producing “object programs nearly as efficient as those which could be produced by good hand-coding.” Testing confirmed this: on most numerical programs, FORTRAN-compiled code ran at 50–80% of the speed of carefully hand-written assembly, and on complex programs where the programmer’s ability to hold the full optimization context in mind degraded, FORTRAN was sometimes faster.

The result was a paradigm shift. If a compiler could produce efficient code, then programming could be done at the level of the problem rather than at the level of the machine. The programmer’s time was worth more than the CPU cycles a less-optimal compiler might waste. The economics of machine time versus programmer time shifted dramatically over the following decade as hardware became cheaper and software became the dominant cost.

Backus’s Turing Award and Self-Critique

John Backus received the ACM Turing Award in 1977. His lecture, “Can Programming Be Liberated from the von Neumann Style?”, is one of the most unusual Turing Award lectures in history: it is a critique of the approach he had pioneered. Backus argued that FORTRAN and its successors — all imperative, statement-by-statement programming languages — were fundamentally limited by the “von Neumann bottleneck”: the single data path between processor and memory that forced programmers to think in terms of sequential state changes.

He proposed functional programming as the alternative — languages like his later creation FP. The argument influenced the development of functional languages but did not displace the imperative tradition FORTRAN had established. The rise of functional programming would take decades longer, and the imperative style remains dominant.


📚 Sources