commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Rall <...@finemaltcoding.com>
Subject Re: [lang][collections] Utils having a public constructor
Date Tue, 13 Aug 2002 00:03:09 GMT
Daniel Rall <dlr@finemaltcoding.com> writes:

> "Jack, Paul" <pjack@sfaf.org> writes:
> 
> > There are valid reasons for keeping things as private as possible.
> > There are many cases in [collections] where bugs were found, or 
> > where algorithms could be more efficient, but we couldn't change
> > the existing code because it exposed protected fields that we wanted
> > to delete, or because it used a protected method whose signature
> > we couldn't change because it would break backwards compatibility.
> 
> I agree that information/implementation hiding is a good thing.  I'm
> missing how this applies to addition of a constructor to classes
> consisting of static methods.

Further thought shows one edge case where this could be an issue,
where you want to dis-allow sub-classing to prevent access to
protected static fields via an instance of the sub-class.  Ain't life
a trade-off.
-- 

Daniel Rall <dlr@finemaltcoding.com>

--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message