You are looking at historical revision 24562 of this page. It
may differ significantly from its current revision.  Design by
Contract  Design by Contract - DbC for short - is a metaphor
introduced by Bertrand Meyer for its purely object-oriented
language Eiffel. The idea consists in strictly separating the
concerns of clients and suppliers of code. The supplier of a
routine is not obliged to check the validity of its arguments,
that's the clients duty. And in fact the supplier mustn't do it
to avoid double checks. On the other hand, the supplier has to
guarantee correct results of his or her routine, the client can
rely on it. It's like a contract between two parties. But like a
contract in social life, the "small-print" is part of the
contract, hence this software contract must be documented
automatically, so that each party knows each-others duties and
benefits.   Another idea of Meyer's is command-query-separation,
where he names a function without side-effect a "query" (it
returns part of the state of his