64 ms·
Behavior does not necessarily depend only on state. Behavior depends on state and the code that uses state to implement said behavior. Encapsulation allows us t
by sklivvz1971 13y ago
Behavior does not necessarily depend only on state. Behavior depends on state and the code that uses state to implement said behavior. Encapsulation allows us to think on terms of behaviors and not of internal states.
That said, this paradigm is easily broken by bad code.