Interfaces, Contracts, and Assertions
Jacob Beningo · Apress eBooks · 2022
An essential feature of every object, module, package, framework, and so forth is that it has a well-defined and easy-to-use interface. Perhaps most important is that those interfaces create a binding contract between the interface and the caller. If the caller were to break that contract, a bug would be injected into the code. Without a software mechanism to verify that the contract is being met, the bugs will not just be injected but also run rampant and perhaps become challenging to find and detect.