Here's a bug that looks fine until it isn't: a wallet object that lets its balance go negative because nothing in the code ever says it can't. You call spend(amount), the arithmetic runs, the number comes out wrong, and the program keeps going anyway — the error shows up three screens later, long after the actual mistake happened (dev.to). That gap — between "the type checker is happy" and "the value makes sense" — is exactly what Bertrand Meyer set out to close when he built Eiffel in the 1980s and wrote it up at length in Object-Oriented Software Construction (Wikipedia).
The Problem Wasn't Bugs. It Was Where Blame Lived.
Meyer's insight, formalized as Design by Contract, treats a method call the way a lawyer treats a business deal: each side has obligations and each side gets guarantees in return. A routine declares a precondition — what the caller must supply — and a postcondition — what the routine promises to deliver if that precondition held. Between calls, a class maintains an invariant, a property that has to stay true no matter what sequence of operations hit the object (dsebastien.net). None of that sounds radical today, but the framing was. Before DbC, a failure in a large object-oriented system meant trawling through both the caller and the callee, because nobody had decided in advance whose job it was to check what. Meyer's contracts made that division explicit: if a precondition is violated, the fault belongs to the caller; if a postcondition fails despite a valid precondition, the fault belongs to the component (dsebastien.net). Object-oriented programming was spreading fast at the time, and inheritance and polymorphism made it easy to swap implementations without knowing exactly what they'd do under the hood. Contracts gave you a way to know anyway — the Liskov Substitution Principle, stated a few years later, is really just contracts applied to subtyping.
Contracts Aren't Extra Paranoia. They're Less of It.
The part of Eiffel's design that I think gets undersold is how DbC reduces code rather than adding to it. Defensive programming tells you to check everything, everywhere, because you can't trust any caller. Design by Contract tells a routine it's allowed to trust its precondition completely, because if the precondition was violated, that's not this routine's problem to solve — it's a bug to surface, not a case to handle gracefully (dsebastien.net). That's a meaningfully different posture than the "validate everything twice, just in case" style most of us learned from scar tissue. It also means the contract doubles as documentation that can't drift from the code, because the compiler (or runtime) is checking it every time the program runs.
The Idea Outlived the Language's Market Share
Eiffel itself never became a mainstream choice, but the pattern kept resurfacing under other names. Ada/SPARK, D, and Kotlin support contracts natively, and C++26 is adding them (dsebastien.net) — everyone else approximates the idea with assertions, validation at the boundary, or property-based tests. It sits next to a related but distinct lineage: "correct by construction," which traces to Dijkstra's argument that you should grow a correctness proof alongside the program rather than bolt one on afterward, later turned into an industrial method by Praxis and SPARK for safety-critical systems (dsebastien.net). Contracts check correctness at the boundary between components at runtime; construction tries to make incorrect states impossible to express in the first place. Different mechanisms, same motive — don't wait for the bug report.
What's interesting right now is that the motive is getting a second wind from an unexpected direction. A JVM-hosted language called Nex is reviving Meyer's exact vocabulary — preconditions, postconditions, old values, invariants baked into the grammar rather than bolted on as a library — and pitching it explicitly as a response to AI-generated code: a model can produce a function that looks right in seconds, but deciding whether it is right still takes as long as it always did (dev.to). Nex lets you write the contract for a deferred class and have an AI-generated implementation inherit and be checked against that contract automatically, which is a very Eiffel-shaped answer to a very 2026 problem. Elsewhere in the same direction, RemObjects has been experimenting with a language called Myth built around the premise that if an AI is the primary author of code, correctness and machine-verifiable intent matter more than human readability (RemObjects blog), and researchers have started proposing spec-first architectures where verification happens against an intermediate representation generated alongside the code itself (arXiv).
None of this makes Eiffel newly popular. But it's a reminder that Meyer wasn't solving a 1980s problem — he was solving the problem of trusting a component you didn't write yourself, which used to mean another team's library and now increasingly means a model's output. Worth watching whether any of Nex, Myth, or the spec-first verification work gets real production traction over the next year, because that's the test contracts never got to take the first time: whether the industry adopts the discipline when the stakes are actually high enough to force it.
