3 ms·
Encapsulation to me is about limiting the supported API. It sucks to release something, and then find many of your users are depending on accidentally-exposed p
by AgentME 9y ago
Encapsulation to me is about limiting the supported API. It sucks to release something, and then find many of your users are depending on accidentally-exposed private values or functions that are all going to break if you do the dream refactor needed to fix all the previous problems and enable new stuff. In situations where the API consumers can't pin an old version (like how a plugin can't choose the version of the product used), then you end up with a constant churn of breakage if the system doesn't limit its API exposure to just the mature public parts. In situations where the API consumers can pin an old version, you end up with consumers updating as slow as possible only when they want a new feature occasionally, missing many fixes or other improvements until much later.
- a-kojeve 9y agoI agree. I like functional programming, but at some point, you're going to have some type of encapsulation, whether at the closure, module, actor, or network boundary. It's always important to think about what API you're exposing.