5 Encapsulation
Have you ever bought something significant, like a house, a plot of land, a company, or a car?
If so, you probably signed a contract. A contract stipulates a set of rights and obligations on both sides. The seller promises to hand over the property. The buyer commits to pay the specified amount at a prescribed time. The seller may give some guarantees as to the state of the property. The buyer may promise not to hold the seller liable for damages after the transaction completes. And so on.
A contract introduces and formalises a level of trust that would otherwise not be present. Why should you trust a stranger? It’s too risky to do that, but the institution of a contract fills the gap.
That’s what encapsulation is about. How ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access