Niklaus Wirth and Pascal
Abstract
Niklaus Wirth spent forty years designing programming languages and arguing that software was getting worse as hardware got faster. His language Pascal (1970) taught structured programming to a generation of computer science students; his book Algorithms + Data Structures = Programs gave the discipline a compact statement of its core subject. He articulated what became known as Wirth’s Law (that software bloat outpaces hardware improvement) long before it became a universal complaint. His later languages, Modula and Oberon, were more elegant than Pascal and less successful commercially, which he considered evidence that the market’s values and computer science’s values had diverged.
From Physics to Programming Language Design
Niklaus Emil Wirth was born in Winterthur, Switzerland, on February 15, 1934. He studied electronics engineering at ETH Zürich, completed a master’s degree at Laval University in Quebec, and received his PhD from UC Berkeley in 1963, working under Harry Huskey on a programming language called Euler.
After positions at Stanford, he returned to Zürich in autumn 1967, spent a year at the University of Zürich and then took a professorship at ETH, where he would spend most of his career. He had already designed ALGOL W (1966, with contributions from Tony Hoare), a cleaned-up variant of ALGOL 60, and had developed strong opinions about what made programming languages teachable, implementable, and verifiable.
Pascal: Structured Programming Made Concrete
In 1970, Wirth published the description of Pascal, a language designed explicitly for teaching structured programming. The design goals were simple and stated clearly: Pascal should enforce good structure by making it easy to write well-organized programs and difficult to write badly organized ones. It should be implementable efficiently with a one-pass compiler. It should be small enough that students could learn all of it.
Pascal embodied Dijkstra’s structured programming principles in concrete syntax:
- No GOTO (or a highly restricted one)
- Clear block structure with
begin...enddelimiters - Strong static typing with a simple, consistent type system
- Procedure and function definitions with local scope
- Records, sets, arrays, and enumerated types as first-class language features
{ Pascal example — structured, typed, explicit }
program Factorial;
var
n, result: integer;
function Fact(x: integer): integer;
begin
if x <= 1 then
Fact := 1
else
Fact := x * Fact(x - 1)
end;
begin
read(n);
result := Fact(n);
writeln(result)
end.Pascal spread rapidly through computer science education in the 1970s and 1980s. It was the main teaching language at many universities for over a decade. Its influence on students who went on to design other languages (including Modula, Ada, Delphi, and in some respects C#) is substantial.
UCSD Pascal (1977), a portable Pascal implementation using a virtual machine (the p-machine), ran on Apple II, CP/M, and early microcomputers and brought Pascal to a wider audience. Turbo Pascal began as a compiler that the Danish student Anders Hejlsberg wrote in 1981 for the Nascom 2 kit computer and then ported to CP/M and MS-DOS; Philippe Kahn, who had heard Wirth lecture at ETH, released it through his new Borland International on 20 November 1983. It took 27 kilobytes, had no copy protection, sold for $49.95 against $340 for Microsoft’s Pascal, reached 400,000 copies by February 1986, and gave a generation of personal computer programmers their first taste of a compiled language with a fast development cycle.
Misconception: Pascal was inherently a slow language
The reputation belonged to an implementation, not the language. Wirth’s original Pascal compiler (CDC 6000, 1970) generated native machine code and ran at full speed. The “slow” label came from the portable p-code implementations, above all UCSD Pascal, which compiled programs to bytecode for a virtual “p-machine” that was then interpreted, trading speed for portability on 8-bit micros that had no just-in-time compilation to win it back. Borland’s Turbo Pascal (1983) compiled straight to native code and was fast, and the reputation faded. The p-code idea was early rather than wrong: the same bytecode-and-virtual-machine approach returned with Java’s JVM (1995) and .NET (2002). See Assembly, Machine Code, and Bytecode and Myths and Misconceptions.
Algorithms + Data Structures = Programs
In 1976, Wirth published “Algorithms + Data Structures = Programs”, a textbook that stated a thesis in its title: programming is the selection and combination of appropriate algorithms and data structures. The book used Pascal to implement and analyze sorting algorithms, data structures (linked lists, trees, hash tables), and language processing. It became a standard reference in computer science curricula and articulated an approach to programming as a rigorous, teachable discipline.
The book also demonstrated Wirth’s pedagogical approach: programs as mathematical objects, clarity over cleverness, simplicity over premature optimization.
Modula-2 and Oberon: The Language Trilogy
Wirth was dissatisfied with Pascal’s limitations for systems programming: it lacked modules (a mechanism for partitioning large programs into independent components), separate compilation, and facilities for low-level hardware access. In 1978, after the experimental Modula (1977), he defined Modula-2, which added:
- Modules with explicit import/export interfaces, a clean model for encapsulating implementation details
- Coroutines for concurrent programming
- Low-level facilities for memory and device access
Modula-2 was used for the Lilith’s own system software, in teaching, and in a number of research and embedded systems.
The Lilith, Modula-2’s machine, came out of a year Wirth spent at Xerox PARC in 1976 and 1977, where he came to admire the Alto; ETH built it in a small series for teaching and offices. In 1987, working on the Ceres workstation at ETH (the 32-bit successor to the Lilith), Wirth published Oberon, a further simplification. Oberon removed features he considered unnecessary (variant records, enumeration types, subrange types) and added type extension, a simple mechanism for object-oriented programming. The Oberon system (with Jürg Gutknecht) was a complete operating system written in Oberon, demonstrating that a minimal language was sufficient for production systems software.
Wirth’s Law
In a 1995 paper, Wirth articulated what became known as Wirth’s Law (also attributed independently to Martin Reiser): software is getting slower more rapidly than hardware becomes faster.
The observation was empirical but pointed to something structural. Each generation of hardware improvements gave programmers more resources to work with; each generation of software used those resources to add layers of abstraction, frameworks, and features rather than to do the same thing faster. Wirth’s own measure was size: he contrasted text editors and operating systems of the 1970s, which ran in kilobytes, with their megabyte successors that did not do correspondingly more.
The Opposite of Moore’s Law
An industry joke of the 1990s ran “What Andy giveth, Bill taketh away”: Intel’s hardware gains, under Andy Grove, consumed by Microsoft’s ever larger software. Wirth’s formulation was more analytical: the economics of software development rewarded richness of features over efficiency of execution, because users evaluated software by what it could do, not by how efficiently it did it. Only when resources were genuinely constrained (embedded systems, mobile devices, high-frequency trading) did efficiency become a competitive priority.
Wirth received the Turing Award in 1984 and was admitted to the German order Pour le Mérite for Sciences and Arts in 1995, retired in 1999, and died on January 1, 2024, in Zürich, Switzerland, at eighty-nine.
Dead End: Oberon as a Universal System
Wirth’s vision for Oberon was ambitious: not merely a language but a complete operating system environment that demonstrated that a single, small, consistently designed system could do everything users needed. The Oberon system was clean, fast, and intellectually consistent, and it found essentially no market.
The problem was that Oberon arrived into a market dominated by Unix and Windows, both of which had enormous installed bases of applications and programmers. A better-designed system with no existing software could not compete with a worse-designed system with all the software users needed. This is a recurring pattern in computing history (technical superiority does not transfer users) and Wirth understood it without accepting it.
The Lesson Wirth Wouldn’t Accept
The Oberon line kept growing: Oberon-2 (1991, with Hanspeter Mössenböck), Component Pascal (1997, from the ETH spin-off Oberon microsystems), Zonnon (2003, from Jürg Gutknecht’s group), and Wirth’s own Oberon-07 (2007), on which he rebuilt Project Oberon for an FPGA board in 2013. None broke out of academic computing. The contrast between Pascal’s commercial success (achieved largely by Borland, not by Wirth) and Oberon’s academic niche illustrates that language adoption is driven by ecosystem, tooling, and first-mover advantage as much as by design quality.
The structured programming movement that Pascal embodied is explored further in Edsger Dijkstra and Structured Programming. The full arc of programming language development is traced in The Evolution of Language.
📚 Sources
- Heinz Nixdorf MuseumsForum blog, “Niklaus Wirth – Ingenieur und Informatiker” (15 February 2019) (return to Zürich in 1967, the PARC year, Lilith and Ceres, Pour le Mérite, retirement 1999)
- Heinz Nixdorf MuseumsForum blog, “Es gab nicht nur BASIC” (17 November 2023) (Hejlsberg’s Nascom compiler, Kahn and Borland, the 20 November 1983 release, size, prices and sales of Turbo Pascal)
- Wirth, Niklaus: “The Programming Language Pascal” — Acta Informatica, Vol. 1 (1971)
- Wirth, Niklaus: Algorithms + Data Structures = Programs (1976), Prentice-Hall
- Wirth, Niklaus: “Modula: A Language for Modular Multiprogramming” — Software: Practice and Experience, Vol. 7 (1977)
- Niklaus Wirth — Wikipedia (ALGOL W 1966, Modula-2 1978, Oberon 1987, Pour le Mérite 1995, Oberon-2 and Oberon-07, death in Zürich)
- Wirth, Niklaus & Gutknecht, Jürg: Project Oberon: The Design of an Operating System and Compiler (1992), Addison-Wesley
- Wirth, Niklaus: “A Plea for Lean Software” — IEEE Computer, Vol. 28, No. 2 (1995)
- UCSD Pascal and the p-System — Wikipedia
- Image: Niklaus Wirth large.jpg by Robert M. McClure (CC BY-SA 3.0), via Wikimedia Commons