hi brian
hm. it seems that either i can't express myself
clearly or we just have quite different approaches
while writing programs.
Brian Moseley wrote:
> Angela Schreiber wrote:
>> this is the point about private methods from my point of
>> view. since it's an opensource project, i will
>> not know (and i should not know) about subclasses. but
>> i must pay attention and respect potential subclasses,
>> if a mark a method protected.
> well yeah. there is a happy medium. for a method where you don't have a
> strong reason to keep it private, make it protected and let subclassers
> decide whether or not they will use it.
it seems that you define the happy medium :)
i regret to say: i don't agree with your statements.
i don't agree that a method should be protected just for
the potential case that someone could find it useful. i think
it should be the other way round.
maybe for a similar reason, i avoid creating
additional, implementation specific 'public' methods,
that are not defined by the interface(s). that's why
i did not agree with your modification in the resource-
factory where you added extra public getter and setter
methods for private fields that have nothing to do
with the job of the factory (creating resources).
hm... i get the impression that we have some fundamental
disagreement. what a pitty.
have a nice weekend!
kind regards
angela
|