Contracts, Preconditions & Invariants
Published: 9 December 2020
Tags: cpp
Someone once told me that code is for people, not computers. You might not agree with it, but it makes a lot sense to me, and falls under the same umbrella as a similar saying, hardware is cheap, developers are expensive. Andrzej's article defines contracts as all of the information a user needs to use a component correctly, then goes on to exploring methods for guaranteeing the proper use of code with preconditions and invariants.
|