Languages / Language

1960

ALGOL

The language that taught languages how to be written.

ALGOL — the ALGOrithmic Language — was designed by an international committee between 1958 and 1960, at a moment when every machine had its own private dialect and Fortran ruled by brute momentum. ALGOL 60 was different: it was designed to be read, and to be specified precisely, before any compiler existed.

Its report, edited by Peter Naur, is one of the most influential documents in computing. To define the grammar it used a notation John Backus had sketched for an earlier draft — now called BNF, Backus-Naur Form — the first time a programming language was given a rigorous, machine-independent syntax.

What it invented

So much of what feels ordinary today arrived here first:

  • Block structure with begin ... end, and nested scopes.
  • Lexical scoping and proper recursion.
  • Parameter passing by value and the famously subtle call-by-name.
  • A clean separation of syntax (the BNF grammar) from semantics.

“Here is a language so far ahead of its time that it was not only an improvement on its predecessors but also on nearly all its successors.” — C. A. R. Hoare

Its reach

ALGOL 60 was never a commercial giant; IBM pushed Fortran and the money followed. But for two decades it was the lingua franca of computer science: algorithms in journals were written in ALGOL because everyone could read it. Its descendants are the whole imperative world. The line that matters most here runs ALGOL → CPL → BCPL → B → C. Pascal, Simula and Ada are cousins.

ALGOL 68, a later and far larger redesign, was specified with the dense two-level van Wijngaarden grammars and split the community; it is powerful but was seen as baroque next to the crystalline 60. The playground runs ALGOL 68 via a68g.

The people

ALGOL had no single author — it was a committee of thirteen European and American scientists, an unusual act of Cold War collaboration. They argued the language into being over a series of meetings in Zurich and Paris and published it as a report so precise that people wrote working compilers from the paper alone. A few of them loom largest:

  • John Backus had already led IBM’s Fortran team; here he contributed the crucial idea that a language’s grammar could be written down formally, giving us BNF. What set him apart came later: in his 1977 Turing Award lecture he effectively disowned the whole imperative style he had helped create, and called for functional programming instead.
  • Peter Naur, a Danish astronomer turned computer scientist, edited the ALGOL 60 report and refined Backus’s notation — he is the “N” in BNF. He spent the rest of his life arguing that programming is not code but theory-building in the programmer’s head, a deeply humane view of the craft. Turing Award, 2005.
  • Alan Perlis carried ALGOL into America and became the first person ever to win the Turing Award (1966). His barbed epigrams — “a language that does not affect the way you think about programming is not worth knowing” — still circulate.

What made them different as a group: they cared more that a language be correct and readable than that it ship on any particular machine. Specification before implementation was a radical priority, and it set the template for how languages have been designed ever since.

Landmark open-source projects

  • Algol 68 Genie (a68g) — the complete ALGOL 68 implementation the playground uses.
  • MARST — GNU’s ALGOL-to-C translator, keeping ALGOL 60 runnable on modern machines.

Try it

# Recursion and block structure, the ideas ALGOL gave everyone. #
BEGIN
   PROC gcd = (INT a, b) INT:
      IF b = 0 THEN a ELSE gcd(b, a MOD b) FI;
   print (("gcd(48, 36) = ", whole(gcd(48, 36), 0), newline))
END

Sources

See also: BNF, C, Bell Labs.