ALGOL, short for Algorithmic Language, was designed by an international committee of American and European computer scientists, first as ALGOL 58 and then, more importantly, as ALGOL 60. Few people write ALGOL today, but anyone asking how ALGOL 60 influenced modern programming languages only needs to look at a block of code in Pascal, C, Java or Python: nested scopes, structured control flow, recursive procedures and grammars written in BNF all trace back to it.

Origins: an international algebraic language

By 1958 Fortran was spreading fast, but it belonged to IBM and was shaped by the IBM 704. In Europe, the German applied mathematics society GAMM was working on a common algorithmic language, while in the United States the ACM had a similar project. The two groups met in Zurich in 1958 and produced the International Algebraic Language, soon known as ALGOL 58.

A second meeting in Paris in January 1960 produced ALGOL 60. Its participants included John Backus, Friedrich L. Bauer, John McCarthy, Peter Naur, Alan Perlis, Heinz Rutishauser, Klaus Samelson, Adriaan van Wijngaarden and Mike Woodger, among others. Peter Naur edited the report, and a revised report followed in 1963.

Design and key features

ALGOL 60 was designed as a clean, machine-independent notation for algorithms. Its main features were:

  • Block structure. begin and end grouped statements, and blocks could declare their own local variables.
  • Lexical scope. Names declared in an inner block were invisible outside it.
  • Recursive procedures, which Fortran at the time did not support.
  • Call by value and call by name parameter passing.
  • Structured control flow with if-then-else and flexible for loops.
  • A formally defined syntax written in what became known as Backus–Naur Form (BNF).

ALGOL 60 deliberately left input and output to each implementation. The report also distinguished a reference language from hardware representations, so keywords were printed in bold or underlined in publications and spelled in various ways on real machines.

A short code example

This ALGOL 60 program sums the harmonic series up to 10. The output procedure outreal follows a common implementation convention rather than the 1960 report, which defined no I/O:

begin
  integer i;
  real sum;
  sum := 0;
  for i := 1 step 1 until 10 do
    sum := sum + 1 / i;
  outreal(1, sum)
end

The := assignment operator, the begin ... end block and declarations at the top of a block all reappeared in later languages, especially Pascal.

How ALGOL was used

ALGOL 60 was widely implemented in Europe. Edsger Dijkstra and Jaap Zonneveld wrote one of the first compilers, for the Electrologica X1, in 1960. Tony Hoare led the ALGOL 60 compiler for the Elliott 803 in Britain, and the Burroughs B5000 series in the United States was designed around an ALGOL dialect, with its operating system written in a high-level language rather than assembly.

ALGOL's biggest role was as a publication language. For many years the Communications of the ACM printed algorithms in ALGOL; Hoare's Quicksort appeared there in 1961 as an ALGOL 60 procedure. In the United States, though, IBM's commitment to Fortran meant ALGOL never achieved comparable commercial use.

ALGOL 68 and the split

The successor, ALGOL 68, was led by Adriaan van Wijngaarden and defined with a two-level grammar. It was powerful and orthogonal but hard to read and implement. Niklaus Wirth and Tony Hoare had proposed a simpler successor, which became ALGOL W, and Wirth went on to design Pascal in 1970.

How ALGOL 60 influenced modern programming languages

ALGOL's descendants form most of the family tree of imperative programming:

  • Pascal, through ALGOL W, and from there Modula-2 and Ada.
  • Simula, an ALGOL 60 extension from Norway that introduced classes and objects, and so influenced C++ and Java.
  • C, through CPL, BCPL and B, which kept block structure and lexical scope.
  • Scheme, which took lexical scoping from ALGOL into the Lisp world.
  • BNF, still used in language specifications today.

The phrase "ALGOL-like language" is still used to describe this broad family, and much textbook pseudocode follows ALGOL's style.

Is ALGOL still used today?

Hardly. A few compilers and interpreters exist, including open-source ALGOL 68 implementations, and Unisys systems descended from the Burroughs line still use an ALGOL dialect, but ALGOL is studied far more than it is written.

Understanding how ALGOL 60 influenced modern programming languages explains why Hoare later called it an improvement not only on its predecessors but on nearly all its successors. Its structure is everywhere, even if its name is not.

Frequently asked questions

What is the difference between ALGOL 58, ALGOL 60 and ALGOL 68?

ALGOL 58 was the first committee draft, ALGOL 60 was the influential version with block structure and a BNF-defined syntax, and ALGOL 68 was a larger and more formal redesign. ALGOL 60 had by far the greatest impact on later languages.

Who invented Backus–Naur Form for ALGOL 60?

John Backus proposed a formal notation for syntax in 1959 for ALGOL 58, and Peter Naur adapted and used it in the ALGOL 60 report. The notation was later named Backus–Naur Form in recognition of both.

ALGOL 60 lacked standard input and output and had no major vendor pushing it in the United States, where IBM supported Fortran. It thrived in European academia and as a publication language, but Fortran had the installed base.