in reply to Re^3: OOP: How to (not) lose Encapsulation
in thread OOP: How to (not) lose Encapsulation

"restrictive and prohibitive" are not examples mindless name-calling. Those are called opinions. So, as you can see, your question is loaded. Oh, did you mean "OOPolice?" If you took offense to that then maybe you rightly were called out for being one.

Now, if you had asked a better question, like "Why do you find this to be restrictive and prohibitive" then maybe we could have a more meaningful conversation. The answer is: because I find them to be unnecessary and a waste of my time. If Betty wants to reach into an object and access its internals, go right ahead. Freedom. As with pretty much any engine out there, you void the warranty when you break encapsulation but why should that stop you if you know what you are doing. These methodologies are for people who don't know what they are doing. And those people shouldn't be doing, they should be learning.

  • Comment on Re^4: OOP: How to (not) lose Encapsulation

Replies are listed 'Best First'.
Re^5: OOP: How to (not) lose Encapsulation
by Arunbear (Prior) on May 14, 2015 at 14:14 UTC
    Pretty much any engine out there is by design hidden within some (usually restricted) compartment.

    But this meditation isn't about making the engine inaccessible, it's mainly about designing in such a way that it's more obvious to Betty where the boundary between internal and external is, so it's harder to unintentionally abuse the internals.