Key Takeaways
Design around stable object types, not a single guessed system function.
Start from durable concepts. Meyer argues that software should be organized around the kinds of things it handles, rather than an early guess about its one main job. A payroll system may begin by issuing paychecks, then grow to handle reporting, tax preparation, and employee records. Its functions change; employee, salary, and payment concepts are more stable anchors for its architecture.
Change is the normal case. The book cites an estimate that maintenance consumes about 70% of software costs. An older study it discusses attributes 41.8% of maintenance effort to changes in user requirements and 17.6% to data-format changes. The lesson is not that data never changes, but that a system should localize the effects of change instead of scattering assumptions throughout its code.
What's striking is that this is a theory of attention as much as a design technique. Starting with the system's current purpose privileges today's request; starting with its concepts makes room for tomorrow's. The caution is that object types are not automatically stable: a business may redefine what counts as an employee or account. The method still requires analysts to identify which concepts are durable enough to anchor a design.
Keep modules autonomous so changes stay local and failures stay contained.
Limit the connections. Meyer treats modularity as a combination of breaking problems into parts, recombining useful parts, making modules understandable, localizing the effects of change, and containing failures. The practical rules follow: keep the number and size of interfaces small, make dependencies visible, and hide implementation decisions behind those interfaces.
A costly warning. The book recounts the failure of AMR's Confirm reservation project, which cost $125 million over four years. More than 200 programmers worked on separately developed components described in 47,000 pages, but the pieces proved incompatible when combined. The point is not that documentation or teams are inherently bad. It is that a large project needs explicit, stable contracts between components, not merely individually completed parts.
The Confirm story makes architecture look less like diagramming and more like controlling the number of ways work can collide. Narrow interfaces reduce the area where one team's change can surprise another. Yet decentralization is not a call to fragment everything: too many tiny modules can create their own coordination burden. The useful target is not minimum connection at any cost, but the fewest clear connections that preserve coherent responsibilities.
Make each class a type and module, defined by services rather than storage.
One construct, two jobs. A class describes a type of objects and serves as a module that groups the operations available on them. Its mathematical foundation is an abstract data type: a description of objects through applicable operations and the properties those operations must satisfy. A stack, for example, is characterized by adding, removing, inspecting, and testing elements, not by whether it uses an array or linked cells.
Hide the representation. The class may implement a stack with an array or linked structure while clients use the same operations. Uniform access means a query can look identical to a client whether its value is stored or computed. This protects clients when designers change representations, while assertions help specify what the operations promise.
The class is powerful because it joins two questions that older methods often separate: what kind of thing is this, and what services belong together? That makes the interface a boundary for both reasoning and change. The boundary is not a claim that the software has captured reality completely. It is a deliberate selection of the properties relevant to a particular system.
Put correctness conditions in the interface; clients promise inputs, routines promise outcomes.
Write the contract. Design by Contract expresses the agreement between a routine and its callers. A precondition states what the caller must ensure; a postcondition states what the routine guarantees; a class invariant states what must remain true of every stable object. For a stack, removing an element requires a nonempty stack, while adding one guarantees that the new element is on top.
Assumptions matter. The book connects this discipline to the 1996 Ariane 5 failure: a conversion from a 64-bit floating-point value to a 16-bit integer caused an exception. A range assumption had been valid for Ariane 4, but not for Ariane 5. The author argues that stating such assumptions as preconditions could have exposed the mismatch. Assertions do not prove a system correct, but they make its claims inspectable.
The contract model turns vague responsibility into an explicit boundary: the caller owns the precondition, and the supplier owns the postcondition. This is a powerful way to reduce redundant defensive checks and clarify blame when a failure occurs. Its limit is equally important: a precise contract can still encode a mistaken requirement. Assertions make assumptions visible; they cannot decide whether those assumptions reflect the right problem.
Extend healthy classes without reopening clients, and inherit only for a defensible is-a relation.
Add without breaking. Inheritance lets a new class reuse an existing class's features, add its own, and redefine selected implementations. A rectangle can inherit polygon operations while providing a more efficient perimeter calculation. Deferred classes describe shared behavior before a full implementation exists, allowing descendants to supply the missing details.
Keep the parent sound. The Open-Closed principle says a module should be usable through a stable interface while still allowing extension. Inheritance supports both aims, but it is not a repair technique for a defective class: fix the defect at its source when possible. Nor should inheritance stand in for a has-a relationship. A car owner has a car; that does not make the owner a car.
Inheritance is most useful when it records a real specialization or a purposeful reuse relationship, not when it merely saves typing. The book's multiple-inheritance examples show how distinct abstractions can combine, while its warnings about taxonomy mania show the cost of inventing categories without meaningful differences. The judgment is architectural: a hierarchy should explain why features and constraints travel together.
Let runtime types choose behavior, while compile-time checks block impossible calls.
Separate two jobs. Static typing checks that a call is permitted before execution; polymorphism allows a declared type to refer to objects of compatible descendant types; dynamic binding selects the implementation that matches the object's actual type. A list declared to hold figures can contain rectangles and triangles, and a call to display can reach the appropriate version for each.
Flexibility needs guardrails. Covariant redefinition can make an argument more specific in a descendant, but combining that with polymorphism can permit a call that fails at run time, a problem the book calls a polymorphic catcall. Anchored declarations and assignment attempts help, while the proposed catcall rule rejects risky combinations. Static typing is valuable, but its rules must remain expressive enough for practical designs.
The distinction between checking that a service exists and choosing which version to run is central. Static checks catch whole classes of mistakes early; dynamic binding keeps clients from hard-coding every possible subtype. The hard cases arise when these virtues interact, especially under covariant redefinition. The book's treatment is strongest when it presents typing not as dogma, but as a balance between safety and usable flexibility.
Parameterize reusable containers, constraining types only when operations require capabilities.
Reuse without type erasure. A generic class such as STACK [G] describes stacks of many element types in one class definition. The compiler can still reject putting an account into a stack of circles. Arrays are treated as a generic library class, so the same approach can provide flexible bounds without a special array construct in the language.
Constrain only when needed. A sorting class needs elements that can be compared; a numeric vector needs elements that can be added. Constrained genericity expresses these requirements through a parent type such as COMPARABLE or NUMERIC. In a suitable compiler, genericity need not mean generating a separate copy of every routine for every actual type.
Genericity is a practical compromise between copying nearly identical classes and abandoning type checks. Constraints make the promise precise: a parameterized class does not need to know every detail of a type, only that the required operations exist. The design challenge is to state the smallest useful capability. An overly broad constraint can make a component hard to reuse; an overly narrow one can reject legitimate types.
Let garbage collection reclaim unreachable graphs; reference counting misses cycles.
Objects outlive their usefulness. Dynamic creation allows systems to build changing structures, but some objects eventually become unreachable from the program's active references. Reclaiming them manually is difficult: a forgotten reference can become dangling, and cyclic references defeat reference counting because objects keep one another's counts above zero.
A real failure illustrates the stakes. The London Ambulance Service system gradually lost memory because a small amount was retained for each vehicle dispatch. After several weeks the system slowed and failed. The book's preferred general solution is automatic garbage collection, using techniques such as marking reachable objects and reclaiming the rest. Specialized libraries can manage simple structures, but application programmers should not have to police every reference.
Memory management is presented as an architectural responsibility, not an optional convenience. Manual reclamation asks every application team to reason about the entire object graph, including cycles and aliases, while garbage collection centralizes that burden. The tradeoff does not disappear: collectors need time, memory, and careful design, especially in interactive or real-time systems. But the alternative transfers a fragile global problem to every routine writer.
Mark cross-processor references explicitly, and wait only when a call needs their result.
Concurrency changes call semantics. The book adds the declaration separate to identify entities that may refer to objects handled by another processor. A call on such an object can proceed asynchronously, so the caller need not wait unless it asks for a result or otherwise needs the object's state. This wait-by-necessity rule helps keep unrelated work moving.
Assertions coordinate access. For separate arguments, preconditions can act as wait conditions. A producer calling put on a bounded buffer waits until the buffer is not full; a consumer calling remove waits until it is not empty. The model also requires exclusive access while a routine executes on an object, avoiding arbitrary interleavings that would undermine invariants.
The design makes concurrency visible where it changes meaning: at the boundary between processors. That is more disciplined than treating parallelism as an invisible optimization. Still, a clear declaration does not make coordination trivial. Shared resources can create waiting and deadlock, so the method's higher-level patterns and explicit preconditions matter as much as the separate marker.
Persist whole object graphs, and treat schema changes as part of software evolution.
Store dependents together. An object with references is not meaningful in isolation. Persistence Closure requires storing its direct and indirect dependents, including cyclic structures, and retrieving the required graph with it. The STORABLE facility illustrates this approach and can support a save operation without handwritten traversal code for every class.
Databases add more. Persistent objects may also need identity, shared access, queries, locking, transactions, and schema evolution. Relational databases handle many structured workloads well, but joining tables to reconstruct references can be cumbersome. Object-oriented databases aim to preserve object identity and relationships more directly, while interoperability with relational systems remains useful when existing corporate data must be accessed.
Persistence is not merely serialization; it extends the life of a model across sessions and across versions of the software. That makes schema evolution a design concern: stored objects must remain interpretable when classes change. The book usefully distinguishes simple persistence from full database management. It also avoids treating object databases as a universal replacement, recognizing the continued need to work with relational systems.
Carry one reversible model through analysis, design, implementation, and graphical interaction.
Keep the lifecycle connected. The cluster model organizes work into groups of related classes, each moving through specification, design, implementation, verification, and generalization. Clusters can progress concurrently because clients rely on suppliers' published interfaces, not their unfinished internals. Reversibility allows implementation discoveries to improve earlier descriptions instead of forcing a rigid waterfall.
The interface is one layer. For graphical applications, the book separates portable abstractions from platform-specific toolkits and uses reusable classes for figures, windows, events, contexts, commands, and states. An application builder can let developers assemble some behavior graphically, while the underlying classes retain the system's architecture. The model remains a selected description of a problem, not a literal copy of reality.
This closing idea links the book's technical and organizational arguments: stable abstractions let teams work in parallel, tools present different views of the same model, and discoveries can travel backward through the process. The restraint is essential. A graphical interface is not the architecture, and a model is never the whole world. The method works by choosing useful structure, then keeping that choice open to correction.
Analysis
Meyer's central contribution is not a checklist of object-oriented features, but a coherent account of why they belong together. Classes unite module and type; abstract data types give classes semantic content; assertions turn that content into contracts; inheritance, genericity, and dynamic binding make reuse adaptable without surrendering static checks. Memory management, concurrency, persistence, and graphical interfaces then test whether the architecture can survive contact with production concerns.
The book's strongest recurring insight is that software quality depends on where knowledge lives. If every client knows a representation, a list of variants, or a sequence of operations, change spreads. If knowledge is concentrated behind a stable interface, systems can evolve locally. This makes modularity less about small files than about controlling dependencies and assigning responsibility. The examples of the Confirm project, the London Ambulance Service, and Ariane 5 show three distinct failures of that control: incompatible components, leaked resources, and an invalid assumption carried into a new system.
The method's main tension is its ambition to be both flexible and statically safe. Covariant redefinition and descendant hiding expose cases where locally sensible designs can undermine global guarantees. Meyer's discussion does not pretend that every conflict has a frictionless solution; it compares stricter rules with the cost of reduced expressiveness. That candor matters. Object orientation is not a guarantee of good design, and reusable abstractions can still encode a mistaken model.
The book also resists separating analysis from implementation. Its claim is not that every design detail belongs in code, but that a shared notation, assertions, and reversible development can reduce translation errors between stages. The result is a demanding engineering discipline: identify the right abstractions, state their contracts, and keep the architecture understandable enough that change remains possible.
Review Summary
Object-Oriented Software Construction receives mixed reviews, with an overall rating of 4.04/5. Readers appreciate its comprehensive coverage of OOP concepts and historical perspective. Some find it outdated but still valuable for understanding software design evolution. The book is praised for its detailed explanations and insights into language design. Critics note its heavy focus on Eiffel and sometimes controversial opinions. While considered a classic by many, some readers find it challenging due to its technical depth and writing style.
Glossary
Abstract data type
Operations define a typeA mathematical description of a set of possible objects through the operations that can be applied to them, the properties of those operations, and any conditions limiting their use. It avoids committing to a physical representation. In the book, an abstract data type supplies the specification that a class partially or fully implements.
Design by Contract
Explicit client-supplier agreementA method for specifying the relationship between a routine and its callers. The precondition states what the client must ensure before calling; the postcondition states what the supplier guarantees afterward. Class invariants express consistency conditions that must hold for objects at stable times. The contract clarifies responsibility and supports reasoning, documentation, and run-time checking.
Class invariant
Persistent object consistency ruleAn assertion describing properties that every instance of a class must satisfy whenever it is created and whenever an exported routine begins or ends. An invariant may state relations among attributes and queries, or constraints on an implementation. Descendants inherit the invariants of their parents, adding any new constraints they require.
Open-Closed principle
Extend without disrupting clientsThe principle that a module should be available for use through a stable interface while remaining open to extension. Inheritance provides one way to add features or redefine implementations without changing the original class or disturbing its existing clients. The principle applies to adapting sound modules, not to leaving defects unfixed.
Genericity
Parameterize classes by typesA mechanism for defining one class with formal type parameters, then deriving usable types by supplying actual types. A generic stack can describe stacks of integers, points, or other types without duplicating its implementation. Constrained genericity limits acceptable types to those that provide required operations, such as comparison or addition.
Deferred class
Partially implemented abstractionA class that contains at least one deferred feature, meaning a feature is specified but lacks an implementation at that level. A deferred class cannot be instantiated directly. Descendants may provide effective implementations. Deferred classes support analysis, design, classification, and reusable behavior patterns whose variable parts are supplied by descendants.
Dynamic binding
Select implementation by object typeThe run-time mechanism that chooses which version of a redefined feature to execute, based on the actual type of the object attached to the call target. A client can call a feature through a general type, while a descendant's specialized implementation runs when the object has that descendant type.
Polymorphism
One entity, compatible object typesThe ability for an entity declared with one type to refer at run time to objects of that type or conforming descendant types. In a statically typed system, inheritance controls which attachments are permitted. Polymorphism enables structures such as lists of figures to contain several compatible kinds of figure.
Persistence Closure principle
Store an object's dependentsThe rule that storing an object must also store the objects directly or indirectly referenced by it, and retrieving it must retrieve any required dependents not already present. This preserves the meaning of object graphs, including structures with cycles, rather than leaving references that point to missing objects.
Separate
Handled by another processorA declaration qualifier marking an entity whose object may be handled by a different processor. Calls on separate targets can proceed asynchronously, while synchronization rules govern access and waiting. The mechanism supports concurrent and distributed systems without changing the basic feature-call model.
FAQ
1. What is Object-Oriented Software Construction by Bertrand Meyer about?
- Comprehensive O-O methodology: The book is a definitive reference on object-oriented software construction, integrating analysis, design, implementation, maintenance, and documentation into a seamless lifecycle.
- Focus on quality and rigor: It emphasizes building reliable, reusable, and maintainable software through object-oriented principles, with a strong focus on software quality factors like correctness, robustness, and extendibility.
- Pedagogical approach: Meyer guides readers through the rationale behind object-oriented constructs, not just their syntax, using a notation that ultimately reveals itself as Eiffel.
- Theory and practice: The book balances theoretical foundations (such as abstract data types and formal methods) with practical advice, tools, and real-world examples.
2. Why should I read Object-Oriented Software Construction by Bertrand Meyer?
- Authoritative and pioneering: Bertrand Meyer is a leading figure in software engineering, and his insights reflect decades of research and industry experience.
- Deep understanding of O-O concepts: The book offers a precise and detailed exploration of object-oriented concepts, including classes, inheritance, genericity, and Design by Contract.
- Methodology and notation integration: It uniquely combines method and notation, helping readers apply object-oriented principles consistently throughout the software lifecycle.
- Preparation for real-world challenges: Advanced topics like concurrency, exception handling, memory management, and schema evolution are covered, making the book valuable for both learners and practitioners.
3. What are the key takeaways from Object-Oriented Software Construction by Bertrand Meyer?
- Seamless software development: The book advocates for a unified approach where analysis, design, implementation, and maintenance use the same object-oriented framework, reducing costly transitions.
- Design by Contract: Contracts (preconditions, postconditions, invariants) are central to specifying and verifying software correctness, improving reliability and documentation.
- Emphasis on reusability and modularity: Object-oriented techniques like inheritance, polymorphism, and genericity are used to build reusable, adaptable software components.
- Practical and theoretical blend: Readers gain both a solid theoretical foundation and practical advice for applying object-oriented methods in real projects.
4. What are the most important object-oriented concepts explained in Object-Oriented Software Construction by Bertrand Meyer?
- Classes and objects: Classes serve as both modules and types, defining the structure and behavior of objects, which are their run-time instances.
- Inheritance and polymorphism: Inheritance allows classes to extend or specialize others, while polymorphism and dynamic binding enable flexible and extensible software architectures.
- Genericity: The book explains both unconstrained and constrained genericity, allowing classes and routines to be parameterized by types for greater flexibility and reuse.
- Design by Contract: Assertions (preconditions, postconditions, invariants) are used to specify and enforce software correctness, forming the backbone of reliable O-O design.
5. How does Bertrand Meyer define and use Design by Contract in Object-Oriented Software Construction?
- Contracts as formal agreements: Design by Contract specifies precise rights and obligations between software modules using preconditions, postconditions, and invariants.
- Assertions embedded in code: Contracts are expressed as executable assertions, serving as both documentation and runtime checks for correctness.
- Improves reliability and debugging: By making contracts explicit, software becomes more robust, and errors are detected early, simplifying debugging and maintenance.
- Integration with exception handling: The method ensures that contracts remain valid even when exceptions occur, maintaining software robustness.
6. What are the key software quality factors discussed in Object-Oriented Software Construction by Bertrand Meyer?
- Correctness and robustness: Software must perform as specified and handle abnormal conditions gracefully, collectively ensuring reliability.
- Extendibility and reusability: The book stresses the importance of building software that is easy to adapt and composed of reusable components, supporting modularity.
- Compatibility, portability, and efficiency: Components should work well together, be transferable across platforms, and perform efficiently.
- Ease of use and timeliness: Software should be user-friendly and delivered on schedule and within budget, rounding out the quality criteria.
7. How does Object-Oriented Software Construction by Bertrand Meyer explain the relationship between genericity and inheritance?
- Distinct but complementary mechanisms: Genericity enables static, horizontal module extension via type parameterization, while inheritance provides vertical, incremental specialization.
- Emulation limitations: The book shows that genericity cannot fully emulate inheritance due to lack of polymorphism, and vice versa, inheritance can only emulate genericity with complexity and performance costs.
- Ideal combination: Meyer recommends combining inheritance with constrained genericity to leverage the strengths of both, supporting type safety and flexibility.
- Anchored types and constraints: The use of anchored declarations and constrained generic parameters ensures type consistency and safe integration of both mechanisms.
8. What is the role of classes, abstract data types, and the Uniform Access Principle in Object-Oriented Software Construction by Bertrand Meyer?
- Classes as central abstraction: Classes unify the concepts of module and type, serving as the foundation for modular and type-safe software construction.
- Abstract data types (ADTs): ADTs define objects by their operations and properties, not by their representation, supporting encapsulation and representation independence.
- Uniform Access Principle: Clients access object properties using the same notation, regardless of whether they are implemented as attributes or functions, preserving interface stability and flexibility.
- Information hiding: The separation of specification (public) and implementation (private) details in classes enforces encapsulation and supports software evolution.
9. How does Object-Oriented Software Construction by Bertrand Meyer address inheritance, polymorphism, and multiple inheritance?
- Inheritance for reuse and extension: Classes can inherit features from one or more parents, supporting code reuse and specialization.
- Polymorphism and dynamic binding: Variables can refer to instances of descendant classes, with method calls dynamically bound at runtime for extensibility.
- Multiple and repeated inheritance: The book explains mechanisms for resolving name clashes, sharing vs. replication, and conflict resolution in multiple inheritance scenarios.
- Assertion inheritance: Contracts (invariants, preconditions, postconditions) are inherited and combined, ensuring safe and consistent specialization.
10. How does Object-Oriented Software Construction by Bertrand Meyer handle exception handling and memory management?
- Disciplined exception handling: Exceptions represent failures to fulfill routine contracts, with mechanisms like rescue clauses and retry instructions for recovery and fault tolerance.
- Exception propagation and history: The book details how exceptions propagate up the call chain and how exception history is managed for debugging and recovery.
- Memory management strategies: It covers static, stack-based, and heap-based object management, advocating for automatic garbage collection over manual deallocation.
- Advanced techniques: Topics like generation scavenging, parallel garbage collection, and handling of bulimia/anorexia (memory leaks/premature reclamation) are discussed for robust memory management.
11. What is the significance of concurrency and the 'separate' keyword in Object-Oriented Software Construction by Bertrand Meyer?
- Minimal extension for concurrency: The book introduces the 'separate' keyword to handle concurrent objects, enabling asynchronous calls and exclusive access without complicating inheritance or contracts.
- Processor abstraction: Each object is managed by an abstract processor (thread, process, etc.), supporting various concurrency models.
- Synchronization via assertions: Preconditions involving separate arguments become wait conditions, integrating synchronization naturally with Design by Contract.
- Deadlock avoidance and examples: The book provides practical patterns (e.g., dining philosophers, elevator control) and mechanisms (business card principle, duels) to avoid deadlocks and manage concurrent interactions.
12. What are the best quotes and maxims from Object-Oriented Software Construction by Bertrand Meyer, and what do they mean?
- "Open-Closed Principle": "A software element such as DEVICE is both usable as it stands and still amenable to extensions." This advocates for software that is open for extension but closed for modification, promoting maintainability.
- "Ask not first what the system does: Ask what it does it to!": Emphasizes focusing on objects (the 'what') before functions (the 'how'), a core object-oriented mindset.
- "Don’t call us, we’ll call you": Describes deferred classes and callbacks, highlighting inversion of control for modular and extensible frameworks.
- "Uniform Access Principle": Clients should not be affected by whether a feature is implemented through storage or computation, ensuring interface stability.
- "If the software does not perform its function, the rest is useless.": Underscores the primacy of correctness in software construction.
Download PDF
Download EPUB
.epub digital book format is ideal for reading ebooks on phones, tablets, and e-readers.