commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Henri Yandell <bay...@generationjava.com>
Subject Re: [lang] Naming conventions
Date Sun, 14 Jul 2002 14:53:15 GMT

I'm happy to remove my #1 as I seem to be the only one in favour. I'm
mainly concerned that we're going to keep changing our minds over each
period.

Stephen, can you please highlight each name change you would expect to
happen in Lang. Does any class with a bunch of static methods and no
reason to be constructed have 'Utils' added as a pattern convention?

Hen

On Sun, 14 Jul 2002, Stephen Colebourne wrote:

> From: "Henri Yandell" <bayard@generationjava.com>
> > > > There are two choices on offer -
> > > >
> > > > 1) Xxxs, such as Strings, Numbers etc.
> > > >
> > > > 2) XxxUtils, such as StringUtils, NumberUtils, etc.
>
> Opinions so far (in order of sending):
> Stephen Colebourne: #2
> Steven Caswell: #2 (non-binding)
> Michael Smith: #2
> Henri Yandell: #1
>
> Reasons so far.
> For #1
> > From Henri Yandell:
> > I favour (1) for consistency with java.util. Arrays/Collections. Also with
> > java.beans.Beans. The only example of (2) I'm aware of is SwingUtilities,
> > and this raises the issue of the 'Utils' abbreviation. Plus it's a utility
> > for a product and not a single class.
> > I think that (1) reads better.
>
> Against #1
> > From Henri Yandell:
> > On the negative side for 'Strings' etc, it could sound like a vague form
> > of collection of String, rather than a series of functions [static
> > methods] for acting upon String objects.
>
>
> For #2
> > From Michael Smith:
> > for consistency with other commons components.
> > From Steven Caswell:
> > IMHO the name is more descriptive of the actual class intent than #1.
> > From Stephen Colebourne
> > I favour (2), for consistency with all the other commons areas (BeanUtils,
> Collections, IO, Patterns).
> Also by not encroaching on the Java naming convention, we allow for Java to
> add a class called Strings in the future for example.
>
> Against #2
> > From Henri Yandell:
> > The abbreviation.
> > It reads poorly.
> > Still has the plural problem, xxxUtils does not contain many Util, unless
> > each function is believed to be a Util. xxxUtil would be the more logical
> > case and is the one Commons.IO appears to have partially implemented.
> > RandomString would become RandomStringUtils?
> > Serialization would become SerializationUtils?
> > What exactly is a Util?
>
>
> Comment:
> This seems to be a question of consistency with Apache Commons versus
> consistency with Java. I also believe that the Utils suffix makes it obvious
> to a user that this is a non-instantiable class of util methods (answering
> your question Henri, yes each method is a util).
>
> Stephen
>
>
>
> --
> To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>
>
>


--
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