← the matrixstructure
Capability — structure
Modules and packages
A way to say “this belongs together, and this part is mine”.
A large program needs boundaries: things that change together live together, and what is inside is not everyone’s business. Ada made it a language feature with specifications and private parts; Common Lisp made it a package system with symbol namespaces; C++ gave namespaces; Go made the import path and the package name the same thing.
The interesting part is what a module system hides. A good one makes the public surface obvious and the internals free to change; a bad one turns dependency management into archaeology, and every language that has shipped one has had to answer the question again.
The trade-off
- Encapsulation costs the shortcuts that come from reaching inside someone else’s module — and those shortcuts are always tempting.
- Package ecosystems create their own hazards: version conflicts, circular dependencies, and supply-chain risk nobody designed for.
Where it came from
Simula 67 had modules; Ada, 1983, made specifications a contract; Go, 2009, made the import path the identity.