On 5/1/06, Sandy McArthur <[EMAIL PROTECTED]> wrote:
On 4/30/06, will pugh <[EMAIL PROTECTED]> 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to