Tech Pioneers

Bertrand Meyer: The Creator of Eiffel and the Inventor of Design by Contract

Bertrand Meyer: The Creator of Eiffel and the Inventor of Design by Contract

In 1986, while most of the software industry was still wrestling with the basics of structured programming, a French-born computer scientist named Bertrand Meyer released a programming language that embedded correctness guarantees directly into source code. The language was called Eiffel — named after the Parisian tower as a symbol of elegant engineering — and it introduced a concept that Meyer called Design by Contract: the idea that every piece of software should have a precise, formal specification of what it expects, what it promises, and what it maintains. Preconditions, postconditions, and class invariants became first-class citizens of the language, checked automatically at runtime. This was not defensive programming or ad-hoc assertion checking. It was a systematic methodology that treated software components the way civil engineers treat load-bearing structures — with mathematically defined obligations and guarantees. Nearly four decades later, Design by Contract has influenced virtually every serious programming language and software engineering methodology in existence. The Rust programming language enforces memory safety contracts through its ownership system. Java adopted assertions in version 1.4. C# introduced Code Contracts. And Meyer’s “Object-Oriented Software Construction,” first published in 1988 and expanded in a monumental second edition in 1997, remains one of the most cited and respected books in the history of software engineering.

Early Life and Path to Computer Science

Bertrand Meyer was born in 1950 in France, at a time when the field of computer science barely existed as an academic discipline. He grew up in an intellectual environment that valued precision and rigor — traits that would define his entire career. Meyer pursued his higher education at some of the most prestigious institutions in France and beyond. He studied at the Ecole Polytechnique in Paris, one of France’s elite grandes ecoles known for producing mathematicians and engineers. He later earned advanced degrees from the University of Nancy and Stanford University, where he was exposed to the emerging American tradition of computer science research.

This combination of French mathematical formalism and American computer science pragmatism shaped Meyer’s approach to software. He was deeply influenced by the formal methods tradition — the idea that programs could and should be proven correct using mathematical reasoning — championed by figures like Edsger Dijkstra and Tony Hoare. But unlike many formal methods advocates who remained in the theoretical realm, Meyer wanted to build tools that working programmers could actually use. He understood that the gap between academic correctness proofs and industrial software practice was enormous, and he set out to bridge it.

Before creating Eiffel, Meyer worked in industry and consulting, gaining firsthand experience with the failures and frustrations of real-world software development. He saw projects collapse under the weight of undocumented assumptions, silent failures, and interfaces whose behavior was defined only by rumor and convention. These experiences convinced him that the software industry needed a fundamental shift — not just better debugging tools or coding standards, but a new paradigm for thinking about the relationship between software components.

The Breakthrough: Eiffel and Design by Contract

The Technical Innovation

Meyer created the Eiffel programming language in 1986, designing it from the ground up as a vehicle for reliable object-oriented software construction. Unlike languages that bolted object-oriented features onto existing procedural designs, Eiffel was conceived as a pure object-oriented language with correctness built into its DNA. Its most distinctive feature — Design by Contract — was not a library or an add-on but a fundamental part of the language syntax.

The core idea was elegantly simple. Every routine (method) in Eiffel could declare preconditions — what must be true before the routine executes — and postconditions — what the routine guarantees will be true after it executes. Every class could declare invariants — properties that must hold true for every instance of the class at all observable points during its lifetime. These contracts were written in the language itself, as boolean expressions, making them simultaneously documentation, specification, and executable checks:

class BANK_ACCOUNT

create
    make

feature {NONE} -- Initialization

    make (initial_amount: REAL)
            -- Create account with initial deposit.
        require
            positive_amount: initial_amount >= 0
        do
            balance := initial_amount
        ensure
            balance_set: balance = initial_amount
        end

feature -- Access

    balance: REAL
            -- Current account balance.

feature -- Operations

    deposit (amount: REAL)
            -- Add amount to the account.
        require
            positive_deposit: amount > 0
        do
            balance := balance + amount
        ensure
            balance_increased: balance = old balance + amount
        end

    withdraw (amount: REAL)
            -- Remove amount from the account.
        require
            positive_withdrawal: amount > 0
            sufficient_funds: amount <= balance
        do
            balance := balance - amount
        ensure
            balance_decreased: balance = old balance - amount
        end

invariant
    non_negative_balance: balance >= 0

end

In this example, the require clauses specify preconditions, the ensure clauses specify postconditions, and the invariant clause at the bottom specifies a class invariant. The old keyword in postconditions refers to the value of an expression as it was before the routine executed — a feature that allows postconditions to express relationships between the before and after states. Every labeled assertion (like positive_deposit) serves as both documentation and a runtime-checkable condition. When contracts are violated during development and testing, the runtime system produces precise error messages identifying exactly which contract was broken, by which routine, and in which class.

But Design by Contract was more than a debugging mechanism. It was a methodology for software design itself. Meyer formulated it as a precise analogy to business contracts: a client (the caller of a routine) and a supplier (the routine itself) enter into a mutual agreement. The client promises to satisfy the precondition; in return, the supplier promises to deliver the postcondition. If the client violates the precondition, the supplier has no obligation — the resulting behavior is the client’s fault, not a bug in the supplier. This clear assignment of responsibility eliminated one of the most pervasive problems in software engineering: the ambiguity about which component is responsible when something goes wrong.

Why It Mattered

Before Design by Contract, software interfaces were defined primarily by their signatures — the types of their parameters and return values. What a routine actually did, under what conditions it would work correctly, and what it guaranteed was left to comments, documentation, or the vague shared understanding of the development team. This gap between interface and specification was the source of countless bugs, particularly in large systems where components were written by different teams or at different times.

Meyer’s contracts closed this gap by making the specification part of the code itself. When a developer wrote a precondition, they were simultaneously documenting the requirements, creating a runtime check, and formally specifying the interface. This unified approach had several profound consequences.

First, it changed how developers thought about errors. In traditional defensive programming, every routine checks its inputs and tries to handle bad data gracefully — leading to redundant checks scattered throughout the codebase and error-handling code that often masks the real problem. With Design by Contract, responsibility was assigned precisely: if a precondition states that an argument must be positive, the caller is responsible for ensuring this, and the routine itself does not need to handle the negative case. This made code both simpler and more correct.

Second, contracts supported inheritance in a principled way. Meyer defined precise rules for how contracts interact with polymorphism: a subclass can weaken preconditions (accept more inputs than the parent) and strengthen postconditions (promise more than the parent), but not the reverse. This rule — known as the contract inheritance principle — formalized Barbara Liskov’s substitution principle in executable terms, ensuring that subtype polymorphism was semantically correct, not just syntactically compatible.

Third, Design by Contract transformed testing and debugging. Instead of writing external test cases that probe a module from outside, developers could embed the correctness criteria directly into the code. When a contract violation occurred, it pinpointed not just that something went wrong, but exactly what went wrong and who was responsible. This was decades ahead of the test-driven development movement that would later sweep the industry.

Beyond Eiffel: The Open/Closed Principle and Object-Oriented Theory

While Eiffel and Design by Contract were Meyer’s most visible contributions, his influence on software engineering theory was equally profound. In “Object-Oriented Software Construction” — first published in 1988 and massively expanded in a 1,296-page second edition in 1997 — Meyer articulated the principles of object-oriented design with a rigor and completeness that no previous author had achieved.

Perhaps the most widely adopted of these principles was the Open/Closed Principle, which Meyer formulated as follows: software entities (classes, modules, functions) should be open for extension but closed for modification. In practical terms, this meant that you should be able to add new behavior to a system without changing existing code — typically through inheritance and polymorphism rather than by editing existing classes. Robert C. Martin later adopted the Open/Closed Principle as the “O” in his famous SOLID acronym, bringing Meyer’s idea to a vastly wider audience of software developers. Today, the principle is taught in virtually every software engineering course and applied in virtually every object-oriented codebase.

Meyer’s book also provided one of the most thorough analyses of inheritance ever written. He identified and classified multiple forms of inheritance — subtype inheritance, facility inheritance, implementation inheritance, and others — and argued that multiple inheritance, when properly designed, was a valuable tool rather than a dangerous complication. Eiffel supported multiple inheritance with a sophisticated renaming and selection mechanism that resolved the “diamond problem” (where a class inherits from two classes that share a common ancestor) cleanly and predictably. This was a controversial position — Java chose single inheritance of classes specifically to avoid the complexity that C++ multiple inheritance had caused — but Meyer argued persuasively that the problems with multiple inheritance in C++ were implementation issues, not fundamental flaws.

Meyer also championed the Command-Query Separation (CQS) principle: every method should either be a command that performs an action (and changes state) or a query that returns data (and has no side effects), but never both. This principle, which Eiffel enforced at the language level, anticipated the functional programming resurgence by decades. Modern patterns like CQRS (Command Query Responsibility Segregation) in distributed systems architecture trace their intellectual lineage directly to Meyer’s work. Developers building modern applications with tools like Taskee rely on these separation principles to maintain predictable state management in complex workflows.

Eiffel’s Advanced Features and Continuing Evolution

Beyond Design by Contract, Eiffel introduced several features that were ahead of their time. Void safety — the compile-time guarantee that no variable could be null unless explicitly declared as “detachable” — was added to Eiffel long before the null safety movement swept through modern languages. Tony Hoare famously called the null reference his “billion-dollar mistake,” and languages from Kotlin to Swift to Rust have since implemented their own null safety mechanisms. Eiffel’s approach was among the earliest practical implementations of this idea in a production language.

Eiffel’s genericity (generic programming) was constrained genericity — generic classes could specify that their type parameters must conform to certain contracts, ensuring that operations on generic types were always safe. This approach predated and influenced the bounded type parameters in Java (added in Java 5, 2004) and the constrained generics in C# (added in C# 2.0, 2005). It was a more principled solution than the unconstrained templates of C++, which could produce notoriously cryptic error messages when type constraints were violated.

The language also featured a powerful exception handling mechanism that was integrated with Design by Contract. In Eiffel, an exception was understood as a contract violation — either a precondition failure (the client’s fault), a postcondition failure or invariant violation (the supplier’s fault), or an external signal. The retry mechanism allowed a routine to attempt recovery from an exception and try again, with the contract checked on each attempt. This was a more structured approach to exception handling than the try-catch mechanisms in most languages, and it ensured that exception handling was always considered in the context of correctness.

Meyer founded Interactive Software Engineering (later renamed Eiffel Software) to develop and promote the language. The company produced EiffelStudio, a full integrated development environment that included a compiler, debugger, and tools for browsing contracts and class hierarchies. While Eiffel never achieved the mass adoption of Java or Python, it maintained a dedicated following in industries where software correctness was critical — finance, defense, aerospace, and telecommunications — and it served as a reference implementation for ideas that gradually spread to mainstream languages.

Academic Career and Teaching at ETH Zurich

In 2001, Meyer became a professor of software engineering at ETH Zurich, one of the world’s most prestigious technical universities. This was the same institution where Niklaus Wirth had created Pascal, Modula-2, and Oberon — and where Wirth had trained generations of computer scientists in the principles of clean language design and systematic programming. Meyer was acutely aware of this lineage and saw himself as continuing a tradition of applying engineering discipline to software.

At ETH Zurich, Meyer led the Chair of Software Engineering and directed research into automated testing, formal verification, and software quality. His group developed AutoTest, a tool that used Design by Contract specifications to automatically generate test cases — the contracts served as test oracles, determining whether the outputs of a test run were correct without requiring manually written assertions. This work anticipated and influenced the broader movement toward property-based testing that later gained prominence through tools like QuickCheck in Haskell and Hypothesis in Python.

Meyer was also a passionate and opinionated educator. He insisted that computer science students learn to think about software in terms of correctness and contracts from the very beginning of their education, not as an advanced topic added after years of learning to hack. His introductory programming courses at ETH used Eiffel, teaching students to write preconditions and postconditions from their first week. This approach produced graduates who thought about software differently — who instinctively asked “what does this routine require?” and “what does it guarantee?” rather than “what does this routine do, roughly?”

Professional teams working with platforms like Toimi benefit from the design-first thinking that Meyer championed — establishing clear specifications before implementation reduces rework and improves the quality of delivered software.

Philosophy and Engineering Approach

Key Principles

Meyer’s philosophy rests on a fundamental conviction: software development is engineering, not art, and it should be practiced with the same rigor and discipline as other engineering fields. This does not mean that software development is mechanical or uncreative. It means that there are objective criteria for quality — correctness, robustness, extendibility, reusability — and that these criteria should guide design decisions, not personal taste or fashion.

Several core principles run through all of Meyer’s work:

Correctness as the primary quality. Meyer argued that a program that does not do what it is supposed to do is worthless, no matter how fast, elegant, or user-friendly it is. This seems obvious, but in practice, the industry has historically prioritized features and deadlines over correctness. Design by Contract makes correctness a first-class concern by requiring developers to specify what “correct” means before they write the implementation.

Self-documenting contracts. Meyer believed that the best documentation is documentation that cannot become outdated — because it is checked automatically. Comments lie; contracts do not (or if they do, the runtime will catch the inconsistency). By embedding specifications in the code itself, Meyer eliminated the persistent problem of documentation drift — the gradual divergence between what code does and what its documentation says it does.

The primacy of abstraction. Object-oriented programming, in Meyer’s view, was fundamentally about abstraction — defining abstract data types with clear interfaces and hidden implementations. He was sharply critical of approaches that treated OOP as merely “programming with classes” or a way to model real-world objects. For Meyer, the key insight of OOP was information hiding: a class should expose what it does (through its public features and contracts) and hide how it does it (through its private implementation).

Systematic reuse. Meyer saw software reuse not as a nice-to-have but as an economic and engineering imperative. He argued that the software industry’s chronic productivity problems stemmed largely from the fact that programmers rewrote the same solutions over and over, rather than building on reliable, reusable components. Eiffel’s class libraries were designed with reuse as a primary goal, with contracts serving as the glue that made reuse safe — a consumer of a reusable class could trust it because the contracts specified exactly what it would do.

Intellectual honesty. Meyer was famous for his willingness to engage in public debate and his insistence on precise technical arguments. He was critical of technologies he considered poorly designed — including certain aspects of Ada and C++ — and he was unafraid to challenge conventional wisdom. His writing was characterized by clarity, wit, and a refusal to accept hand-waving in place of rigorous reasoning.

Legacy and Lasting Impact

Bertrand Meyer’s legacy operates on two levels. The surface level — the Eiffel programming language — reached a dedicated but relatively small community. The deeper level — the ideas and principles that Meyer articulated — permeated the entire field of software engineering.

Design by Contract, in various forms, has become ubiquitous. Java’s assert statement, introduced in JDK 1.4 (2002), was directly inspired by Eiffel’s contracts. Microsoft Research developed Code Contracts for .NET, extending C# with preconditions, postconditions, and invariants. The D programming language includes built-in contract support with in, out, and invariant blocks. Google’s Guava library for Java provides Preconditions utility methods. Python’s assert statement and the icontract library bring contract-like checking to Python code. The Rust programming language, while not having explicit contract syntax, enforces many of the same guarantees through its type system and ownership model.

The Open/Closed Principle became foundational to object-oriented design education. The SOLID principles — of which Meyer’s Open/Closed Principle is the second — are taught in universities worldwide and expected knowledge for professional software developers. The Command-Query Separation principle influenced the design of APIs across dozens of languages and frameworks.

“Object-Oriented Software Construction” remains one of the definitive references on object-oriented programming. Its treatment of inheritance, genericity, typing, concurrency, and software methodology is unmatched in depth and rigor. The book has been cited thousands of times in academic papers and remains on recommended reading lists for software engineers decades after its publication. Few technical books achieve this kind of longevity.

Meyer was elected an ACM Fellow and received numerous awards for his contributions to software engineering. He has authored multiple books beyond “Object-Oriented Software Construction,” including “Touch of Class” (an introductory programming textbook based on Design by Contract) and “Agile! The Good, the Hype and the Ugly” (a characteristically frank assessment of agile methodologies).

Perhaps most importantly, Meyer demonstrated that it was possible to be both rigorous and practical. At a time when the formal methods community and the industrial programming community were largely talking past each other, Meyer built a bridge — showing that formal specifications could be embedded in a practical programming language and used by working engineers, not just theoreticians. This vision — that correctness and productivity are not opposites but allies — remains his most enduring contribution to the field.

Key Facts

  • Full name: Bertrand Meyer
  • Born: 1950, France
  • Education: Ecole Polytechnique (Paris), University of Nancy, Stanford University
  • Created: Eiffel programming language (1986)
  • Invented: Design by Contract methodology (preconditions, postconditions, class invariants)
  • Key book: “Object-Oriented Software Construction” (1st ed. 1988, 2nd ed. 1997, 1,296 pages)
  • Formulated: Open/Closed Principle (later the “O” in SOLID)
  • Formulated: Command-Query Separation (CQS) principle
  • Founded: Interactive Software Engineering (later Eiffel Software)
  • Academic position: Professor of Software Engineering, ETH Zurich (2001 onward), succeeding the tradition of Niklaus Wirth
  • Eiffel features: Design by Contract, multiple inheritance, genericity, void safety, garbage collection
  • Honors: ACM Fellow, Dahl-Nygaard Prize, IEEE Computer Society Harlan D. Mills Award
  • Other books: “Touch of Class,” “Agile! The Good, the Hype and the Ugly”

Frequently Asked Questions

What is Design by Contract and how does it differ from regular assertions?

Design by Contract is a software design methodology where every software component specifies its obligations and guarantees through preconditions (what must be true before a routine runs), postconditions (what will be true after it runs), and class invariants (what must always be true for any instance of a class). While regular assertions are ad-hoc checks scattered through code for debugging purposes, Design by Contract is a systematic approach that defines the relationship between a caller (client) and the called routine (supplier) as a formal agreement. The key difference is conceptual: assertions say “check this, just in case,” while contracts say “this is the specification — violating it means a bug in a clearly identified party.” Contracts also interact with inheritance (subclasses can weaken preconditions and strengthen postconditions), support automatic documentation generation, and enable automatic test generation using the contracts as test oracles.

Why did Eiffel not become as widely adopted as Java or Python?

Eiffel’s relatively limited adoption compared to Java or Python was not due to technical shortcomings but to a combination of market and ecosystem factors. Java (1995) had the backing of Sun Microsystems and was positioned as the language for the emerging World Wide Web, giving it massive corporate momentum. Python benefited from being free, open-source, and exceptionally easy to learn. Eiffel, as a commercial product from a small company, lacked these advantages. Additionally, Eiffel’s emphasis on correctness and rigorous design was ahead of its time — the industry in the 1990s and 2000s prioritized rapid development and time-to-market over formal guarantees. However, Eiffel’s ideas proved more influential than the language itself: Design by Contract, the Open/Closed Principle, void safety, and the concepts from “Object-Oriented Software Construction” spread far beyond Eiffel’s user base and are now fundamental to modern software engineering.

How has Design by Contract influenced modern programming languages?

Design by Contract has influenced modern languages both directly and indirectly. Directly, several languages have built-in contract support: D has in and out contract blocks, Ada 2012 introduced pre/post aspects inspired by Eiffel, and Kotlin’s contracts system allows functions to declare guarantees about their behavior. Indirectly, the philosophy has shaped language features that enforce contracts through the type system rather than runtime checks. Rust’s ownership and borrowing system enforces memory safety contracts at compile time. TypeScript’s type system enforces structural contracts on JavaScript values. Swift’s optionals and Kotlin’s null safety enforce non-null contracts. Even testing frameworks like JUnit’s assumptions, property-based testing tools like QuickCheck, and API specification formats like OpenAPI can be traced to the fundamental insight that Meyer articulated: software components should have explicit, checkable specifications of their behavior.