commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Benson <gudnabr...@gmail.com>
Subject Re: svn commit: r1391258 - /commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/Conversion.java
Date Wed, 03 Oct 2012 14:42:59 GMT
Urgh; I find these method names rather painful.  Why wouldn't we
simply provide endianness and bit ordering as enums, and parameterize
accordingly?

Matt

On Wed, Oct 3, 2012 at 9:07 AM, Gary Gregory <garydgregory@gmail.com> wrote:
> On Wed, Oct 3, 2012 at 7:28 AM, Jörg Schaible <joerg.schaible@gmx.de> wrote:
>
>> Jörg Schaible wrote:
>>
>> >
>> > sebb wrote:
>>
>> [snip]
>>
>> >> I find the naming convention rather difficult to follow.
>> >>
>> >> For example, the letter 's' sometimes means 'array' and sometimes means
>> >> 'string' Also M0 is not obvious as an abbreviation, nor is BeM0
>> >
>> > I am all open for better names, all *I* want to have is the
>> functionality.
>>
>> Has anyone a better idea for the names?
>>
>
> I would probably loose the plural to indicate an array.
>
> I would expand M0 to Msb0 which itself is an acronym. Abbreviating an
> acronym is to mysterious to me.
>
> So I'd end up with:
>
> boolBeMsb0ToHexDigit(boolean[] src)
>
> instead of:
>
> boolsBeM0ToHexDigit(boolean[] src)
>
> I would use real examples in the Javadoc:
>
>      * <p>
>      * (true, false, false, false) is converted as follow: '8' ...
>
> instead of:
>
>      * <p>
>      * (1, 0, 0, 0) is converted as follow: '8' ...
>
> and use [ ] instead of ( ) to show an array
>
> my 2c,
>
> Gary
>
>
>> - Jörg
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>> For additional commands, e-mail: dev-help@commons.apache.org
>>
>>
>
>
> --
> E-Mail: garydgregory@gmail.com | ggregory@apache.org
> JUnit in Action, 2nd Ed: <http://goog_1249600977>http://bit.ly/ECvg0
> Spring Batch in Action: <http://s.apache.org/HOq>http://bit.ly/bqpbCK
> Blog: http://garygregory.wordpress.com
> Home: http://garygregory.com/
> Tweet! http://twitter.com/GaryGregory

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


Mime
View raw message