---
title: "Meaning & Key Takeaway of: Writing a class without its contract…"
description: "\"Writing a class without its contract would be similar to producing an engineering component (electrical circuit, VLSI (Very Large Scale Integration) ch..."
image: "https://sms4smile.com/quotes/i/5b8/bertrand-meyer-31554_bridges_writing-a-class-without-its-contract-wou_2364044.jpg"
---

#  Writing a class without its contract would be similar to…

![“Writing a class without its contract would be similar to producing an engineering component (electrical circuit, VLSI (Very Large Scale Integration) chip, bridge, engine...) without a spec. No professional engineer would even consider the idea.” quote by Bertrand Meyer](https://sms4smile.com/quotes/i/5b8/bertrand-meyer-31554_bridges_writing-a-class-without-its-contract-wou_2364044.jpg)   [Download](https://sms4smile.com/quotes/i/5b8/bertrand-meyer-31554_bridges_writing-a-class-without-its-contract-wou_2364044.jpg) [Open image](https://sms4smile.com/quotes/i/5b8/bertrand-meyer-31554_bridges_writing-a-class-without-its-contract-wou_2364044.jpg)

> “Writing a class without its contract would be similar to producing an engineering component (electrical circuit, VLSI (Very Large Scale Integration) chip, bridge, engine...) without a spec. No professional engineer would even consider the idea.”

[Bertrand Meyer](https://sms4smile.com/quotes/author/bertrand-meyer/)

## About This Quote

This interpretation was drafted with AI assistance. It is one reading of the quote, not the author's own explanation.

Writing code without a clear contract is like building engineering hardware without specifications; it leads to unpredictable, unsafe results.

**In simple terms:** Contracts guide reliable software creation.

Key Takeaway

Define explicit contracts before coding.

Themes

software reliability engineering discipline specification

Mood

analytical pragmatic

Type

technical educational

When to use this quote

- API design
- code reviews
- system integration
- risk management

Key Concepts

Design by contract software architecture quality assurance

Questions to Reflect On

- How can contracts adapt to changing requirements?
- When is a contract unnecessary?

A Different Perspective

Contracts can be rigid, limiting flexibility in rapid prototyping.

★ ★ ★ ★ ★   No ratings yet

[Bridges](https://sms4smile.com/quotes/about/bridges/) [Circuits](https://sms4smile.com/quotes/about/circuits/) [Class](https://sms4smile.com/quotes/about/class/) [Engineering](https://sms4smile.com/quotes/about/engineering/) [Engineers](https://sms4smile.com/quotes/about/engineers/) [Ideas](https://sms4smile.com/quotes/about/ideas/) [Integration](https://sms4smile.com/quotes/about/integration/) [Programming](https://sms4smile.com/quotes/about/programming/) [Specs](https://sms4smile.com/quotes/about/specs/) [Technology](https://sms4smile.com/quotes/about/technology/) [Writing](https://sms4smile.com/quotes/about/writing/)

## Related quotes

> [Excellence isn't about meeting the spec, it's about setting the spec.](https://sms4smile.com/quotes/seth-godin/excellence-isn-t-about-meeting-the-spec-it-s-about-setting-the-spec-2/)

[Seth Godin](https://sms4smile.com/quotes/author/seth-godin/)

> [You write a spec, and you pour your heart and soul and life into a spec, and you think that spec is the movie…](https://sms4smile.com/quotes/robert-ben-garant/you-write-a-spec-and-you-pour-your-heart-and-soul-and-life-into-a-2/)

[Robert Ben Garant](https://sms4smile.com/quotes/author/robert-ben-garant/)

> [“for the service in spec/service\_spec.rb, you add another describe block:”](https://sms4smile.com/quotes/paul-dix/for-the-service-in-spec-service-spec-rb-you-add-another-describe-block/)

[Paul Dix](https://sms4smile.com/quotes/author/paul-dix/)

> [“Spec = asking the world to have sex with you and promising dinner date to one lucky winner.”](https://sms4smile.com/quotes/jeffrey-zeldman/spec-asking-the-world-to-have-sex-with-you-and-promising-dinner-date/)

[Jeffrey Zeldman](https://sms4smile.com/quotes/author/jeffrey-zeldman/)

> [Art is never defect-free. Things that are remarkable never meet spec, because that would make them standardized, not worth talking about.](https://sms4smile.com/quotes/seth-godin/art-is-never-defect-free-things-that-are-remarkable-never-meet-spec/)

[Seth Godin](https://sms4smile.com/quotes/author/seth-godin/)

> [The plain truth is we are going to die. Here I am, a teeny spec surrounded by boundless space and time, arguing with the…](https://sms4smile.com/quotes/charles-simic/the-plain-truth-is-we-are-going-to-die-here-i-am-a-teeny-spec/)

[Charles Simic](https://sms4smile.com/quotes/author/charles-simic/)

> [A lot of screenwriters have a drawer of unsold scripts that they cut their teeth on. I don't have one. Everything I've written, after…](https://sms4smile.com/quotes/jon-spaihts/a-lot-of-screenwriters-have-a-drawer-of-unsold-scripts-that-they-cut/)

[Jon Spaihts](https://sms4smile.com/quotes/author/jon-spaihts/)

> [It may seem like I'm overlooking a technical detail or a spec change, but at the end of the day I'm mostly going to…](https://sms4smile.com/quotes/marques-brownlee/it-may-seem-like-i-m-overlooking-a-technical-detail-or-a-spec-change/)

[Marques Brownlee](https://sms4smile.com/quotes/author/marques-brownlee/)

> [Ball-tampering. There, I've said it. Things that shouldn't be said: the judge in the Saddam trial appears to be wearing comedy specs and moustache.](https://sms4smile.com/quotes/eddie-mair/ball-tampering-there-i-ve-said-it-things-that-shouldn-t-be-said-the/)

[Eddie Mair](https://sms4smile.com/quotes/author/eddie-mair/)

> [Trace the stars with your fingers in hopes you’ll connect the dots, but don’t get caught in the lines that aren’t really there ‘cause…](https://sms4smile.com/quotes/john-o-callaghan/trace-the-stars-with-your-fingers-in-hopes-you-ll-connect-the-dots/)

[John O'Callaghan](https://sms4smile.com/quotes/author/john-o-callaghan/)

> [ I decided to write \[Collateral Beauty\] on my own which made it the first spec script I wrote in 11 years. ](https://sms4smile.com/quotes/allan-loeb/i-decided-to-write-collateral-beauty-on-my-own-which-made-it-the/)

Allan Loeb

> [“If you can’t understand the spec for a new technology, don’t worry: nobody else will understand it either, and the technology won’t be that…](https://sms4smile.com/quotes/joel-spolsky/if-you-can-t-understand-the-spec-for-a-new-technology-don-t-worry/)

[Joel Spolsky](https://sms4smile.com/quotes/author/joel-spolsky/)

> [“Ex ‘Fleet man?” “He was a full Commander, last I heard, sir.” “Interesting.” Falconer commented. “Get me his specs. If I have to take…](https://sms4smile.com/quotes/christina-engela/ex-fleet-man-he-was-a-full-commander-last-i-heard-sir-interesting/)

[Christina Engela](https://sms4smile.com/quotes/author/christina-engela/)

> [I woke up one morning to find I was famous. I bought a white Rolls-Royce and drove down Sunset Boulevard, wearing dark specs and…](https://sms4smile.com/quotes/peter-o-toole/i-woke-up-one-morning-to-find-i-was-famous-i-bought-a-white-rolls/)

[Peter O'Toole](https://sms4smile.com/quotes/author/peter-o-toole/)

> [I am seeing that Gandhi is looking through these specs that whether we have made India clean or not, what we have done and…](https://sms4smile.com/quotes/narendra-modi/i-am-seeing-that-gandhi-is-looking-through-these-specs-that-whether/)

[Narendra Modi](https://sms4smile.com/quotes/author/narendra-modi/)

## More by Bertrand Meyer

> [Eiffel borrows quite openly from several earlier programming languages and I am sure that if we had found a good language construct in C…](https://sms4smile.com/quotes/bertrand-meyer/eiffel-borrows-quite-openly-from-several-earlier-programming/)

[Bertrand Meyer](https://sms4smile.com/quotes/author/bertrand-meyer/)

> [You can either have software quality or you can have pointer arithmetic, but you cannot have both at the same time.](https://sms4smile.com/quotes/bertrand-meyer/you-can-either-have-software-quality-or-you-can-have-pointer/)

[Bertrand Meyer](https://sms4smile.com/quotes/author/bertrand-meyer/)

> [Incorrect documentation is often worse than no documentation.](https://sms4smile.com/quotes/bertrand-meyer/incorrect-documentation-is-often-worse-than-no-documentation/)

[Bertrand Meyer](https://sms4smile.com/quotes/author/bertrand-meyer/)

> [I think Smalltalk is inappropriate for serious industrial developments. After all, run time is a little late to find out whether you have a…](https://sms4smile.com/quotes/bertrand-meyer/i-think-smalltalk-is-inappropriate-for-serious-industrial/)

[Bertrand Meyer](https://sms4smile.com/quotes/author/bertrand-meyer/)

> [As Mr. Nagle so competently points out, almost no one uses Eiffel; in fact until recently there were only 9 users. But now a…](https://sms4smile.com/quotes/bertrand-meyer/as-mr-nagle-so-competently-points-out-almost-no-one-uses-eiffel-in/)

[Bertrand Meyer](https://sms4smile.com/quotes/author/bertrand-meyer/)

> [Ask not first what the system does; ask what it does it to!](https://sms4smile.com/quotes/bertrand-meyer/ask-not-first-what-the-system-does-ask-what-it-does-it-to/)

[Bertrand Meyer](https://sms4smile.com/quotes/author/bertrand-meyer/)

> [Constants are widely known for the detestable practice of changing their values; we should prepare ourselves against the consequences of such fickleness](https://sms4smile.com/quotes/bertrand-meyer/constants-are-widely-known-for-the-detestable-practice-of-changing/)

[Bertrand Meyer](https://sms4smile.com/quotes/author/bertrand-meyer/)

> [Perfect reusable components are not obtained at the first shot.](https://sms4smile.com/quotes/bertrand-meyer/perfect-reusable-components-are-not-obtained-at-the-first-shot/)

[Bertrand Meyer](https://sms4smile.com/quotes/author/bertrand-meyer/)

> [Correctness is clearly the prime quality. If a system does not do what it is supposed to do, then everything else about it matters…](https://sms4smile.com/quotes/bertrand-meyer/correctness-is-clearly-the-prime-quality-if-a-system-does-not-do-what/)

[Bertrand Meyer](https://sms4smile.com/quotes/author/bertrand-meyer/)

> [There are only two things wrong with C++: The initial concept and the implementation.](https://sms4smile.com/quotes/bertrand-meyer/there-are-only-two-things-wrong-with-c-the-initial-concept-and-the/)

[Bertrand Meyer](https://sms4smile.com/quotes/author/bertrand-meyer/)

> [Software entities (classes, modules, functions, etc.) should be open for extension, but closed for modification.](https://sms4smile.com/quotes/bertrand-meyer/software-entities-classes-modules-functions-etc-should-be-open-for/)

[Bertrand Meyer](https://sms4smile.com/quotes/author/bertrand-meyer/)

> [C++ is the only current language making COBOL look good](https://sms4smile.com/quotes/bertrand-meyer/c-is-the-only-current-language-making-cobol-look-good/)

[Bertrand Meyer](https://sms4smile.com/quotes/author/bertrand-meyer/)

> [I have always felt sympathy towards the biologists who accept to debate creationists. Now I also understand them better; one can fight opinions, not…](https://sms4smile.com/quotes/bertrand-meyer/i-have-always-felt-sympathy-towards-the-biologists-who-accept-to/)

[Bertrand Meyer](https://sms4smile.com/quotes/author/bertrand-meyer/)

> [Careful as they may be, developers of Eiffel libraries will always run into cases in which, after releasing a library class, they suddenly experience…](https://sms4smile.com/quotes/bertrand-meyer/careful-as-they-may-be-developers-of-eiffel-libraries-will-always-run/)

[Bertrand Meyer](https://sms4smile.com/quotes/author/bertrand-meyer/)

> [The role of a trainer or consultant is to empower the customer, not to make himself indispensable](https://sms4smile.com/quotes/bertrand-meyer/the-role-of-a-trainer-or-consultant-is-to-empower-the-customer-not-to/)

[Bertrand Meyer](https://sms4smile.com/quotes/author/bertrand-meyer/)

[Explore all 16 Bertrand Meyer quotes ](https://sms4smile.com/quotes/author/bertrand-meyer/)

## More Bridges quotes

> [Poetry has, in a way, been my bridge to my acting career.](https://sms4smile.com/quotes/omari-hardwick/poetry-has-in-a-way-been-my-bridge-to-my-acting-career/)

[Omari Hardwick](https://sms4smile.com/quotes/author/omari-hardwick/)

> [Nothing teaches great writing like the very best books do. Yet, good teachers often help students cross that bridge, and I have to say…](https://sms4smile.com/quotes/julia-glass/nothing-teaches-great-writing-like-the-very-best-books-do-yet-good/)

[Julia Glass](https://sms4smile.com/quotes/author/julia-glass/)

> [In my rear view mirror the sun is going down sinking behind bridges in the road and I think of all the good things…](https://sms4smile.com/quotes/roger-waters/in-my-rear-view-mirror-the-sun-is-going-down-sinking-behind-bridges/)

[Roger Waters](https://sms4smile.com/quotes/author/roger-waters/)

> [My first big mistake was made when, in a moment of weakness, I consented to learn the game; for a man who can frankly…](https://sms4smile.com/quotes/robert-benchley/my-first-big-mistake-was-made-when-in-a-moment-of-weakness-i/)

[Robert Benchley](https://sms4smile.com/quotes/author/robert-benchley/)

> [The WPA was one of the most productive elements of FDR's alphabet soup of agencies because it put people to work building roads, bridges,…](https://sms4smile.com/quotes/ronald-reagan/the-wpa-was-one-of-the-most-productive-elements-of-fdr-s-alphabet/)

[Ronald Reagan](https://sms4smile.com/quotes/author/ronald-reagan/)

> [The sense that in this universe we are treated as strangers, the longing to be acknowledged, to meet with some response, to bridge some…](https://sms4smile.com/quotes/anonymous/the-sense-that-in-this-universe-we-are-treated-as-strangers-the/)

[Anonymous](https://sms4smile.com/quotes/author/anonymous/)

> [When you walk, try to think nothing! You can then obtain the silence of a streetlight or a bridge; stop thinking; after that, you…](https://sms4smile.com/quotes/mehmet-murat-ildan/when-you-walk-try-to-think-nothing-you-can-then-obtain-the-silence-of/)

[Mehmet Murat Ildan](https://sms4smile.com/quotes/author/mehmet-murat-ildan/)

> [By the time they were pulling into the parking lot of the A&amp;P, the mood was fading, the moment gone. Amy could feel it…](https://sms4smile.com/quotes/elizabeth-strout/by-the-time-they-were-pulling-into-the-parking-lot-of-the-a-p-the/)

[Elizabeth Strout](https://sms4smile.com/quotes/author/elizabeth-strout/)

> [Al Pacino and Jeff Bridges do it for me in a big way.](https://sms4smile.com/quotes/angela-scanlon/al-pacino-and-jeff-bridges-do-it-for-me-in-a-big-way/)

[Angela Scanlon](https://sms4smile.com/quotes/author/angela-scanlon/)

> [Instead of building castles against your enemies, build bridges for them to come to you!](https://sms4smile.com/quotes/mehmet-murat-ildan/instead-of-building-castles-against-your-enemies-build-bridges-for/)

[Mehmet Murat Ildan](https://sms4smile.com/quotes/author/mehmet-murat-ildan/)

> [Instead of finding himself in nerd heaven—where every nerd gets fifty-eight virgins to role-play with—he woke up in Robert Wood Johnson with two broken…](https://sms4smile.com/quotes/junot-diaz/instead-of-finding-himself-in-nerd-heaven-where-every-nerd-gets-fifty/)

[Junot Diaz](https://sms4smile.com/quotes/author/junot-diaz/)

> [Each person is an island unto himself, in a very real sense; and he can only build bridges to other islands if he is…](https://sms4smile.com/quotes/carl-rogers/each-person-is-an-island-unto-himself-in-a-very-real-sense-and-he-can/)

[Carl Rogers](https://sms4smile.com/quotes/author/carl-rogers/)

> [The real test of a bridge player isn’t in keeping out of trouble, but in escaping once he’s in.](https://sms4smile.com/quotes/alfred-sheinwold/the-real-test-of-a-bridge-player-isn-t-in-keeping-out-of-trouble-but/)

[Alfred Sheinwold](https://sms4smile.com/quotes/author/alfred-sheinwold/)

> [The law ... allows rich as well as poor to sleep under bridges.](https://sms4smile.com/quotes/anatole-france/the-law-allows-rich-as-well-as-poor-to-sleep-under-bridges/)

[Anatole France](https://sms4smile.com/quotes/author/anatole-france/)

> [Guys like Todd Bridges never overcame being a child star. You can't have any big failures. I've always felt regular. I played organized ball…](https://sms4smile.com/quotes/bow-wow/guys-like-todd-bridges-never-overcame-being-a-child-star-you-can-t/)

[Bow Wow](https://sms4smile.com/quotes/author/bow-wow/)

[Browse all 1,521 Bridges quotes ](https://sms4smile.com/quotes/about/bridges/)

```json
{
    "@context": "https://schema.org",
    "@graph": [
        {
            "@type": "Quotation",
            "text": "Writing a class without its contract would be similar to producing an engineering component (electrical circuit, VLSI (Very Large Scale Integration) chip, bridge, engine...) without a spec. No professional engineer would even consider the idea.",
            "creator": {
                "@type": "Person",
                "name": "Bertrand Meyer"
            },
            "isPartOf": {
                "@id": "https://sms4smile.com/quotes/#website"
            },
            "url": "https://sms4smile.com/quotes/bertrand-meyer/writing-a-class-without-its-contract-would-be-similar-to-producing-an/",
            "about": {
                "@type": "Thing",
                "name": "Bridges"
            },
            "@id": "https://sms4smile.com/quotes/bertrand-meyer/writing-a-class-without-its-contract-would-be-similar-to-producing-an/#quotation",
            "image": {
                "@type": "ImageObject",
                "@id": "https://sms4smile.com/quotes/i/5b8/bertrand-meyer-31554_bridges_writing-a-class-without-its-contract-wou_2364044.jpg",
                "contentUrl": "https://sms4smile.com/quotes/i/5b8/bertrand-meyer-31554_bridges_writing-a-class-without-its-contract-wou_2364044.jpg",
                "url": "https://sms4smile.com/quotes/i/5b8/bertrand-meyer-31554_bridges_writing-a-class-without-its-contract-wou_2364044.jpg",
                "width": 1080,
                "height": 1080,
                "caption": "“Writing a class without its contract would be similar to producing an engineering component (electrical…” — Bertrand Meyer",
                "creditText": "SMS4Smile Quotes",
                "creator": {
                    "@id": "https://sms4smile.com/quotes/#organization"
                }
            }
        },
        {
            "@type": "BreadcrumbList",
            "itemListElement": [
                {
                    "@type": "ListItem",
                    "position": 1,
                    "name": "Home",
                    "item": "https://sms4smile.com/"
                },
                {
                    "@type": "ListItem",
                    "position": 2,
                    "name": "Quotes",
                    "item": "https://sms4smile.com/quotes/"
                },
                {
                    "@type": "ListItem",
                    "position": 3,
                    "name": "Bertrand Meyer",
                    "item": "https://sms4smile.com/quotes/author/bertrand-meyer/"
                },
                {
                    "@type": "ListItem",
                    "position": 4,
                    "name": "Writing a class without its contract...",
                    "item": "https://sms4smile.com/quotes/bertrand-meyer/writing-a-class-without-its-contract-would-be-similar-to-producing-an/"
                }
            ],
            "@id": "https://sms4smile.com/quotes/bertrand-meyer/writing-a-class-without-its-contract-would-be-similar-to-producing-an/#breadcrumb"
        },
        {
            "@type": "WebSite",
            "@id": "https://sms4smile.com/quotes/#website",
            "name": "SMS4Smile Quotes",
            "url": "https://sms4smile.com/quotes/",
            "publisher": {
                "@id": "https://sms4smile.com/quotes/#organization"
            }
        },
        {
            "@type": "Organization",
            "@id": "https://sms4smile.com/quotes/#organization",
            "name": "SMS4Smile Quotes",
            "url": "https://sms4smile.com/quotes/",
            "logo": {
                "@type": "ImageObject",
                "url": "https://sms4smile.com/quotes/wp-content/themes/sq/assets/icons/icon-512.png",
                "width": 512,
                "height": 512
            }
        }
    ]
}
```
