3 ms·
> Instead of "hiding", think of encapsulation as "organizing". You can organize verbs, most of the time, by the parts of program state they deal with. Isn't th
by gdp 17y ago
> Instead of "hiding", think of encapsulation as "organizing". You can organize verbs, most of the time, by the parts of program state they deal with.
Isn't that reinforcing the point that the main way that OOP is useful is for name-space control, which is achievable in many non-OO ways?
- apotheon 17y agoI think that's the point -- encapsulation is achievable in many non-OO ways, and encapsulation is basically just a subset of namespace management. In other words, encapsulation itself isn't necessarily bad, so griping about encapsulation doesn't seem like a very productive way to "prove" that OOP is "bad".