You’re being too pedantic. I can design my software so that encapsulated objects won’t be exposed to any further outside modifications. I can also design my software so that outside modifications are permissible in those situations where this makes sense. I can control my software by design; that’s my job as a software engineer.

There is no one accepted definition of encapsulation, just as there is no one accepted definition of object-oriented design and programming (OOD, OOP). Academic references are all over the place on this. (Ditto for functional programming or FP.)

Moreover, no programming paradigm is so absolutely strict that it prevents programming abuse. To use any programming paradigm, you still have to exercise discipline and responsibility. A paradigm should not be a straightjacket; it should give you some flexibility to adapt to unusual programming situations.

Every veteran programmer I know understands this. OOP has been used effectively for decades by thousands of developers in thousands of software projects. The issue that you raise about encapsulation’s privacy has seldom, if ever, been a major problem. In fact, Scalfani is the first person I’ve heard to raise this as an issue at all. Methinks he’s being rather anal.

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