commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Torsten Curdt" <tcu...@apache.org>
Subject Re: [compress] New draft 5
Date Tue, 02 May 2006 10:44:05 GMT
On 5/1/06, Sandy McArthur <sandymac@apache.org> wrote:
> On 4/30/06, will pugh <willpugh@sourcelabs.com> wrote:
> > 1)  You often change method names based on the parameter types, e.g.
> > Archiver.addFile + Archiver.addFileName, setUnpackDestinationName +
> > setUnpackDestinationFile, etc.  It seems more conventional  and less
> > chaotic to give all the methods the same name, and have them only differ
> > based on parameter.  Examples of this style are constructors for
> > java.utils.zip.ZipFile, java.io.FileInputStream,
> > java.io.FileOutputStream, org.apache.commons.io.IOUtils.IOUtils.copy,
> > org.apache.commons.io.FileUtils.isFileNewer, etc
>
> This is intentional, in a previous version the method names were the
> same. The problem with using the same name but different param types
> breaks the JavaBean property getter/setter rules and the classes will
> not be as usable in at least some scripting environments.

I am sorry ...whoever wants to use this API from a JavaBean
can easily write a little wrapper class. I rather have a slick API
design than adhering to the JavaBean interface.

My 2 cents

cheers
--
Torsten

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


Mime
View raw message