3 ms·
"silently exposing internal complexity via mutable state" It does no such thing, OOP encapsulates both data and behavior, it encapsulates its internals and exp
by mythz 11y ago
"silently exposing internal complexity via mutable state"
It does no such thing, OOP encapsulates both data and behavior, it encapsulates its internals and exposes an API that ensures its class invariants - there's nothing in OOP that dictates implementation or that it has to use mutable state.
We're able to write larger and more complicated software because of the encapsulation possible in OOP, not in spite of it.