Skip to main content
ReferenceComputing historyBeginner

ALGOL: describing and structuring algorithms

How ALGOL changed program design: an international project, blocks, variable scope, recursion and language reports, from 1958 to Pascal and Simula.

Show contents

In the late 1950s, sharing a calculation method was not as simple as sending someone a program. Code could depend on a particular computer, its instruction set or the practices of a computing centre. A researcher often had to recover the algorithm from the details needed to run it.

ALGOL, short for Algorithmic Language, addressed a shared ambition: to write methods clearly enough for publication and precisely enough for a compiler to translate them. Its history reveals a lasting change. Programs became organised texts whose parts and rules could be discussed independently of the machines that would execute them.

A language for communicating as well as calculating

Early high-level languages were already reducing the need to write machine instructions. FORTRAN showed that a compiler could translate scientific formulas into efficient code. ALGOL did not arrive in a world where automatic translation was still an untried idea.

Exchanging methods posed another problem. How could a researcher publish an equation-solving method so that a colleague using another computer could understand and adapt it? A common notation needed to separate the algorithm from the requirements of a particular machine.

The project combined three aims: an approach close to mathematical notation, suitable for publication and open to automatic translation. That did not guarantee that every program would run unchanged on every computer. Compilers, input/output conventions and representations suited to available character sets were still needed.

A collective undertaking, from Zurich to Paris

ALGOL 58: finding common ground

The Zurich meeting of 27 May to 2 June 1958 brought together representatives of the American ACM and GAMM, the association for applied mathematics and mechanics. Eight delegates worked towards a common version of their groups’ proposals.

They included John Backus and Alan Perlis on the American side, and Friedrich L. Bauer, Heinz Rutishauser and Klaus Samelson on the European side. Others contributed to the preparatory work. Attributing ALGOL to one inventor would erase both the negotiation and the experience behind the compromise.

The preliminary report described the International Algebraic Language, associated with the name ALGOL 58. It offered a starting point for discussion, not a definition already free of ambiguities. Exchanges and early implementation attempts helped shape what followed.

ALGOL 60: clarifying how programs are organised

From 11 to 16 January 1960, thirteen representatives met in Paris. Peter Naur prepared a new draft as the basis for discussion and edited the collective report. Contributions addressed declarations, procedures, names and conditions, among other matters.

ALGOL 60 became a reference point through the way its constructs fitted together and the precision sought in their description. The 1960 report was subsequently reviewed. A clarification meeting took place in Rome in 1962, and the revised report appeared, among other venues, in the January 1963 Communications of the ACM. Revising a definition and creating a new language are different activities.

Milestone What it refers to
ALGOL 58 The initial Zurich compromise and its preliminary report
ALGOL 60 The Paris definition, subsequently clarified in the revised report
ALGOL 68 A redesign developed within IFIP, with a final draft in 1968, publication in 1969 and a revised report in 1975

Blocks: giving variables a context

As a program grows, it accumulates names and operations. If every variable has to be known throughout the program, separately written sections may use the same name for different purposes.

In ALGOL 60, a block brings declarations and statements together between begin and end. A locally declared variable belongs to that context. Scope determines where in the text a name refers to that variable; it is not simply a matter of which variable was most recently created during execution.

Both examples below use a textual representation of ALGOL 60: keywords in plain text and, in the second example, * for multiplication. The report distinguishes keywords typographically; the exact input conventions depend on the compiler. No machine-specific output statement has been added.

begin
  integer total;
  total := 10;
  begin
    integer total;
    total := 3
  end;
  total := total + 1
end

The declarations introduce two different variables, even though they share a name. Inside the inner block, total := 3 changes the inner variable, which hides the outer one. After that block, the name refers to the outer variable again. Its value is still 10, and the final assignment increases it to 11.

This organisation supports local reasoning and reduces name clashes between parts of a program. It does not remove every possible interaction between procedures and variables, but it provides a rule visible in the program text itself.

Two nested ALGOL 60 blocks: the outer block declares total and assigns 10; the inner block declares another total and assigns 3; after the inner block, the outer total becomes 11.

Original Bethemesh diagram matching the example. Frames represent declaration contexts, not physical areas of memory; the values shown belong to the moments described.

Procedures, recursion and control: organising the work

Naming a calculation instead of copying it

A procedure describes an operation that can be called with parameters. It avoids copying a method whenever it is needed and gives a name to part of the reasoning.

Subroutines existed before ALGOL. ALGOL 60’s contribution included integrating them with declarations, scope and the language’s calling rules. It supported parameters passed by value and others passed by name, with different behaviour. That richness also introduced subtleties: recognising a call’s form does not necessarily reveal all its effects.

Allowing a procedure to call itself

Recursion allows a procedure to call itself. In the example below, each call handles a smaller integer until a stopping condition is reached. ALGOL invented neither mathematical recursion nor the first experiments with recursive programming; ALGOL 60 made it an important part of its programming model.

This second ALGOL 60 example is intended for non-negative integers small enough for the computer’s numerical capacity:

begin
  integer resultat;
  integer procedure factorielle(n);
    value n; integer n;
    factorielle := if n = 0 then 1
                   else n * factorielle(n - 1);
  resultat := factorielle(4)
end

Here, value n requests passing by value. The procedure assigns its result to its own name, factorielle. For an argument of 4, it calculates 4 × 3 × 2 × 1; the case 0 returns 1 and stops the descent. The variable resultat therefore receives 24, without any display being specified.

Each call needs to recover its context and resume the suspended calculation. That also places demands on the compiler and runtime organisation: concise notation can require an elaborate mechanism.

Making choices and repetition visible

Expressions combine numbers, variables and operations. Conditions written with if … then … else and for statements express choices and repetition in the program text. Readers do not have to reconstruct every branch from machine addresses.

ALGOL 60 nevertheless retained go to. It would be anachronistic to describe it as already free of jumps, or to equate its block structure with the full set of structured programming methods developed later.

Defining a language through a report and a grammar

The report provided a shared reference for programmers, teachers and compiler writers. It distinguished syntax, the permitted forms, from the rules explaining their meaning.

In 1959, John Backus presented a formal notation for describing the language emerging from Zurich. Peter Naur adapted that approach for the ALGOL 60 report. The notation associated with their names, BNF, made it possible to state construction rules rather than relying solely on examples and ordinary prose. Our John Backus biography explains the principle in more detail.

The benefit was practical: a precise rule could specify how an expression was built from smaller elements and where a declaration was allowed. Compiler writers had an explicit basis for recognising programs. Grammar alone, however, could guarantee neither termination nor a correct answer; the meaning of constructs still had to be defined.

The reports also distinguished a reference language, a form for publications and representations adapted to hardware. Printed notation was not automatically something every computer would accept as input. That separation was part of defining a language beyond one particular machine.

Real compilers and uneven adoption

ALGOL was not just a language on paper. At Amsterdam’s Mathematisch Centrum, Edsger Dijkstra and Jaap Zonneveld developed an ALGOL 60 compiler for the Electrologica X1. In 1962, Dijkstra published an account of its use, strengths and limitations: the definition was being put to work.

The manufacturer Burroughs offered Extended ALGOL for the B 5000. Its December 1961 manual described input/output facilities, among other features. This documented industrial example rules out the claim that nobody used ALGOL outside universities.

No single factor explains its adoption difficulties. FORTRAN benefited from established tools, programs and computing practices. ALGOL 60 left input/output outside its common definition. Implementations had to supply their own facilities, limiting the direct exchange of complete programs.

The original compromise thus created a lasting tension. A method might be readable in a publication without being immediately executable everywhere. Available compilers, local extensions, libraries and maintenance mattered as much as an elegant definition. Scientific influence, implementation uptake and commercial success measure different things.

ALGOL 68: a broader project with contested choices

IFIP Working Group 2.1 continued considering ALGOL’s future. The proposal led by Adriaan van Wijngaarden, with contributors including Barry Mailloux, John Peck and Cornelis Koster, became ALGOL 68. The final draft of December 1968 preceded publication in 1969; a revised report was published in 1975.

The project sought more general constructs and consistent ways to combine them. It developed types, expressions, procedures and the description of input/output. Its definition used a more elaborate grammar than ALGOL 60’s.

That ambition did not command unanimous support. Peck’s account describes disagreements and the minority report accompanying acceptance of the text. The debate also concerned the balance between expressive power, readability and implementation difficulty.

ALGOL 68 was therefore more than ALGOL 60 with a few extra keywords. The two must be distinguished when reading code, documentation or accounts of their adoption.

Tracing its legacy through specific connections

The connection with Pascal is documented. Niklaus Wirth developed ALGOL W, then drew on that experience when developing Pascal. Blocks and procedures carried forward, alongside different choices about simplicity, types and data structures. Our history of Pascal follows that development.

Another branch runs through Simula, whose first version built on ALGOL 60 for simulation. It led to abstractions discussed in our history of object-oriented programming. That does not make ALGOL 60 an object-oriented language.

These documented connections are more informative than a family tree making every modern language a direct ALGOL descendant. Similar block delimiters do not prove direct influence. Other aims, such as widening access to programming through BASIC, opened different paths.

ALGOL’s lasting legacy includes several habits: structuring programs, making names understandable in context, defining languages explicitly and discussing their rules collectively. Computers remain essential, but a particular machine is no longer the only starting point for thinking about a program.

Frequently asked questions

Is ALGOL one language with three compatible versions?

No. ALGOL 58 provided an initial basis; ALGOL 60 redefined and clarified the language; ALGOL 68 was a redesign. The variant matters: an ALGOL 60 example cannot simply be assumed to work in ALGOL 68.

Did ALGOL invent procedures and recursion?

No. Subroutines and recursion had earlier or parallel histories. ALGOL 60 played an important role by combining recursive procedures, blocks and scope rules in a widely discussed and disseminated language definition.

What is variable scope for?

It determines which declaration gives a name its meaning in a particular part of a program. Two blocks can each declare a variable with the same name. Within the inner block, its variable hides the outer one, helping to keep parts of the program separate.

Why does formal notation not replace every explanation?

Grammar describes permitted constructions but does not explain every effect during execution. Meaning and usage also need to be described. A syntactically valid program can still be wrong or run forever.

Was ALGOL a commercial failure with no real users?

That description is too sweeping. Compilers and industrial uses existed, including at Burroughs, while the reports helped communication and teaching. Its commercial reach differed from FORTRAN’s, and its influence extends beyond the number of programs still running.

Was this article useful?

Sources and references

  1. ACM–GAMM committee; Alan J. Perlis and Klaus Samelson, editors, Preliminary Report: International Algebraic Language (opens in a new tab), Communications of the ACM, 1(12), pp. 8–22, 1958Page in English
  2. ALGOL 60 committee; Peter Naur, editor, Report on the Algorithmic Language ALGOL 60 (opens in a new tab), Communications of the ACM, 3(5), pp. 299–314; offprint with typographical corrections dated 28 June 1960, 1960Page in English
  3. ALGOL 60 committee; Peter Naur, editor, Revised Report on the Algorithmic Language ALGOL 60 (opens in a new tab), Communications of the ACM, 6(1), pp. 1–17; copy held by Tufts University, 1963Page in English
  4. John W. Backus, The Syntax and Semantics of the Proposed International Algebraic Language of the Zurich ACM-GAMM Conference (opens in a new tab), Proceedings of the International Conference on Information Processing, UNESCO, pp. 125–132, 1959Page in English
  5. Adriaan van Wijngaarden, Barry J. Mailloux, John E. L. Peck and Cornelis H. A. Koster, Final Draft Report on the Algorithmic Language ALGOL 68 (opens in a new tab), Mathematisch Centrum, MR 100; record and document preserved by CWI, 1968Page in English
  6. Adriaan van Wijngaarden and the other report editors, Revised Report on the Algorithmic Language ALGOL 68 (opens in a new tab), Acta Informatica, 5, pp. 1–236; ALGOL Bulletin reprint including errata through the end of 1978, 1975Page in English
  7. Andrew S. Tanenbaum, A Tutorial on Algol 68 (opens in a new tab), ACM Computing Surveys, 8(2), pp. 155–190; record at Vrije Universiteit Amsterdam, 1976Page in English
  8. Edsger W. Dijkstra, Operating Experience with ALGOL 60 (opens in a new tab), The Computer Journal, 5(2), pp. 125–127; CWI archive, 1962Page in English
  9. Burroughs Corporation, Input-Output Facilities: A Part of Extended ALGOL for the Burroughs B 5000 (opens in a new tab), Burroughs Corporation, December 1961; copy preserved by Bitsavers, 1961Page in English
  10. John E. L. Peck, The ALGOL 68 Story (opens in a new tab), ACS Bulletin, November 1978, pp. 4–6; account by a member of the design team, 1978Page in English
  11. Niklaus Wirth — Summary of Projects, 1962–1999: ALGOL W and Pascal, ETH Zurich archives (opens in a new tab)Page in English
  12. University of Oslo — Simula Through the Years: ALGOL 60 as the basis for Simula I and the Simula 67 definition (opens in a new tab)Page in English
  13. Computer History Museum — History of ALGOL: chronology and catalogue of original documents (opens in a new tab)Page in English

Collection

Programming languages

5 / 29

  1. 01Grace Hopper: from early compilers to COBOL
  2. 02John Backus: FORTRAN, BNF, and the rejection of machine code
  3. 03Dennis Ritchie: the C language at the heart of Unix
  4. 04FORTRAN: proving that a compiler could compete with assembly
  5. 05ALGOL: describing and structuring algorithms
  6. 06The C language: making systems portable without hiding the machine
  7. 07BASIC: opening programming to non-specialists
  8. 08SQL: how the relational model changed databases
  9. 09Niklaus Wirth: from Pascal to Oberon, designing through simplicity
  10. 10Bjarne Stroustrup: designing C++ without giving up performance
  11. 11Pascal: learning to program by making structure visible
  12. 12C++: from C with Classes to modern C++
  13. 13Object-oriented programming: objects, messages, and reusable abstractions
  14. 14Guido van Rossum: creating Python to make code readable
  15. 15Brendan Eich: JavaScript, from Netscape prototype to Web standard
  16. 16James Gosling: the engineer behind Java
  17. 17Python: readability, batteries included, and a global ecosystem
  18. 18Java: write once, run anywhere
  19. 19JavaScript: the language that made the Web interactive
  20. 20The history of Rust: memory safety for systems programming
  21. 21John McCarthy: Lisp and the idea of programming with symbols
  22. 22Alan Kay: Smalltalk and the computer as a personal medium
  23. 23Barbara Liskov: the abstraction that made software modular
  24. 24Robin Milner: ML, machine-assisted proof, and languages of interaction
  25. 25Brian Kernighan: AWK, Unix, and the art of explaining code
  26. 26Anders Hejlsberg: from Turbo Pascal to C# and TypeScript
  27. 27Larry Wall: Perl, the language that connected the tools of the Internet
  28. 28Yukihiro Matsumoto: Ruby and programmer happiness
  29. 29Rasmus Lerdorf: PHP and the democratization of the dynamic Web