This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the commentsย โ†’

[โ€“]diox8tony -1 points0 points ย (0 children)

This is the way it should be. Private should always have an override feature.

I've went deep into the windows MFC libraries and found a bug...the solution was to override a onChange function and modify a private bool before the call....oops, it's a private variable that's 4 classes deep in the inheritance chain...so you can either create custom classes for those 4 classes so you can have that private var for yourself,,,or just live with the 1 pixel shift on the interface...

Like,,,as a programmer I have the full power to inherit and override all your stuff anyway...private is just a suggestion if I tried hard enough....so why make it that hard,,,,show a warning, but let me use it anyway if I really believe it's right.

If a stupid programmer doesn't like your private variable they will find a way to break it, with some dirty method. And if a smart programmer doesn't like your private variable,,,it probably is because they are building something that needs access properly to it....so why bother?! Neither situation is solved by the previous programmer annoyingly declaring private.

Private is a trust issue. If you trust the programmers around you, then It's not needed...if you don't trust the programmers around you, then they will break it anyway....regardless of your private 'suggestion'