jargon

Comparison

EncapsulationvsInformation hiding

Encapsulation

another team reached into the field directly, and now you cannot rename it without breaking them.

Keeping a module's internals private so they stay changeable. The value is not secrecy — it is that whatever you expose becomes a contract you have to honour, and whatever you hide stays yours. Every leaked internal converts a future refactor from a local decision into a negotiation with everyone who reached in, which is the mechanism behind Hyrum's law.

Full entry →

Information hiding

the thing most likely to change is the only thing behind the interface, and nobody outside can name it.

Parnas's original criterion for decomposing a system: each module hides one decision that is likely to change, so the change stays inside it. It predates encapsulation as a language feature and is a stronger idea than it — private fields hide data, information hiding hides a decision. The test is not whether the fields are private but whether you could change the decision without editing anything outside the module.

Full entry →

Related comparisons