Who said?

You’re being too pedantic. There’s no universally accepted definition of encapsulation.

Encapsulation and object-oriented programming are not a straightjacket. You have to use this paradigm responsibly and allow for flexibility of design in your software.

I can design my software so that encapsulation privacy is not violated. I can design my software to allow for external mutability if that’s reasonable. That’s my responsibility as a software designer.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store