in reply to Re^7: Private Methods Meditation
in thread Private Methods Meditation

Again, we seem to agree.

But these methods are not public. That is, they are not meant to be part of the public API that the class and its subclasses present to the user. Rather it is part of the private API between the class and its subclasses. So they are private (at least to some extent).

I speak of really private methods, not just private to some extend. Those methods you speak of above I refer to as protected methods, using Java terminology as Java is the only other OO language I know. Those methods I call as methods since as you say--they need method lookup. Only really private methods I don't call as methods as I know exactly which method I want to call.

In any case it takes coordination between the maintainer of the class and subclass to make this work and continue to work. If you don't feel comfortable with that, then you shouldn't be subclassing.

I couldn't agree more!

My only addition to this is that: even though this is problematic I don't see any reason to use those simple ways already provided to make it less problematic. Calling really private methods as functions is one way for me to make it less problematic, or using your expression, making the problem virtually go away ever more.

ihb

Read argumentation in its context!