On Mon, 17 Sep 2007 23:57:11 +0900
"Trustin Lee" <[EMAIL PROTECTED]> wrote:

> Hi folks,
> 
> As many people pointed out, MINA currently has somewhat inconsistent
> naming style for acronyms (e.g IO vs Io and MDC vs Mdc).  I'm not sure
> standardizing the naming style for acronyms are definitely required,
> but I'd like to know what you think about it.
> 
> Personally I'd prefer all capital acronym because it's what acronym
> is, and IOException is already a good example. :)

Think about this though.  Say I've got a class called IPAddress.
Consider this:

public class Foo {
    private IPAddress ipAddress;

    public void setIPAddress(IPAddress ipAddress) { this.ipAddress = ipAddress; 
}

    public IPAddress getIPAddress(IPAddress ipAddress) { return ipAddress; }

    // other stuff...
}

Many frameworks will expect that, given a property name of "ipAddress", there
will be a getter/setter of "getIpAddress/setIpAddress".  To use the "proper"
names, you'd need a property of name "iPAdress", which looks ridiculous.  So
I say, treat acronyms like words.

So:

[ ]: All capital
[X]: Only the initial letter should be capital

- DML

Reply via email to