jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jukka Zitting <ju...@zitting.name>
Subject Re: checkins to jcr-server
Date Thu, 08 Dec 2005 20:35:01 GMT

Brian Moseley wrote:
> i think the burden of proof should be on the person who wants to keep 
> methods private ;)

I'm not so familiar with the jcr-server design that I can comment on 
design decisions there, but in general i disagree with the above 
principle. :-)

A method should be private if there is no specific reason otherwise. A 
non-private method is a part of the external API contract of a class and 
  carries with it all the burden of API compatibility. The narrower the 
API contract of a class is the easier the class is to restructure to 
match an evolving environment. A narrower API is also easier to document 
and maintain. In general it is much easier to relax the visibility of a 
method when needed than to restrict the availability of a non-private 


Jukka Zitting

View raw message