in reply to Re^2: Howto keep private methods private?
in thread Howto keep private methods private?

I think if I inherit and override a public method with one that is private (or otherwise breaks the public interface), that's certainly rude, but I would not say that's a problem with the way the privacy is implemented. Perhaps we have different definitions of privacy at work here. I was trying to make a method that outsiders cannot call. You appear to want a method that outsiders cannot see at all.

  • Comment on Re^3: Howto keep private methods private?

Replies are listed 'Best First'.
Re^4: Howto keep private methods private?
by stvn (Monsignor) on Sep 14, 2007 at 20:57 UTC
    I was trying to make a method that outsiders cannot call. You appear to want a method that outsiders cannot see at all.

    But they can call your method, it blows up in thier face, but they can call it.

    I think if I inherit and override a public method with one that is private (or otherwise breaks the public interface), that's certainly rude, but I would not say that's a problem with the way the privacy is implemented.

    Yes, it is incredibly rude given your definition of privacy. But if you were to be able to write that private method, and only have the local class use it, and all other subclasses use the original private one. It wouldnt be very rude then, because only the local class would need to know. Everyone else could just go about thier own merry way :)

    -stvn