commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Henri Yandell <bay...@generationjava.com>
Subject Re: [all]Naming conventions (where do I find 'em?)
Date Sun, 17 Nov 2002 00:47:37 GMT


On Sat, 16 Nov 2002, Jeff Varszegi wrote:

> I was looking over the FastArrayList class (which I like) and noticed the methods setFast(boolean)
> and getFast().  In my opinion, these would better (and more standardly) be named
> 'setFastModeEnabled' and 'isFastModeEnabled'.  At the very least, shouldn't getFast()
be named
> 'isFast'?  It's a boolean indicator.

I'd agree, but getFast is legal for a boolean too.

> For another example, I also noticed methods called 'getNumActive' and
'getNumIdle' in ObjectPool.
> I think these would be better named 'getActiveCount' and
> 'getIdleCount' or something similar.  This would reduce the
> unnecessary use of abbreviations and be more like stuff found
> elsewhere in Java.

Abbreviations are bad, true.

> 1. Are there naming standards to which the Jakarta community adheres?

The Sun coding standards are often adhered to. There are some other
Jakarta projects which have coding standards, Turbine do I think, and
Avalon might as well. Tomcat? And their standards are often chosen by
particular projects in Commons.

> 2. Is everything that has been previously named set in stone?  (If so,
> I won't bring such things up.)

Depends on releases ususally. Things have to be slowly deprecated for a
rename and often it's not worth the 2 or 3 releases worth of management.

I agree with both of your renamings though. The renamed ones make more
sense if they could be applied.

My tuppence,

Hen


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