Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #36230

Re: Uppercase methods names

Path csiph.com!aioe.org!.POSTED!not-for-mail
From Arne Vajhøj <arne@vajhoej.dk>
Newsgroups comp.lang.java.programmer
Subject Re: Uppercase methods names
Date Mon, 30 Jan 2017 21:20:09 -0500
Organization Aioe.org NNTP Server
Lines 42
Message-ID <o6os8o$1vbl$1@gioia.aioe.org> (permalink)
References <namens-20170131023341@ram.dialup.fu-berlin.de>
NNTP-Posting-Host PBuS014lhzVyHjLbXmo/ZQ.user.gioia.aioe.org
Mime-Version 1.0
Content-Type text/plain; charset=windows-1252; format=flowed
Content-Transfer-Encoding 8bit
X-Complaints-To abuse@aioe.org
User-Agent Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0
X-Notice Filtered by postfilter v. 0.8.2
Xref csiph.com comp.lang.java.programmer:36230

Show key headers only | View raw


On 1/30/2017 8:36 PM, Stefan Ram wrote:
>   This is not mentioned in JLS 6.1, but are
>
> public static int java.awt.Color.HSBtoRGB(float,float,float)
> public static double java.lang.Math.IEEEremainder(double,double)
> public static float[] java.awt.Color.RGBtoHSB(int,int,int,float[])
> public static long java.util.Date.UTC(int,int,int,int,int,int)
> public static native double java.lang.StrictMath.IEEEremainder(double,double)
>
>   enough prior art to derive a rule:
>
>       »When a method name starts with an acronym that usually
>       is written in all-upperase, it is still written in
>       all-uppercase when it appears at the start of a method
>       name«?

The old SUN Java coding convention:

http://www.oracle.com/technetwork/java/javase/documentation/codeconventions-135099.html

sort of indicates that well known abbreviations are a special case:

<quote>
unless the abbreviation is much more widely used than the long form, 
such as URL or HTML
</quote>


But Google's coding convention has plenty of examples not allowing it:

https://google.github.io/styleguide/javaguide.html#s5.3-camel-case

I would say that we are out there where the discussion does not
have much practical impact.

Both HSBtoRGB and hsbToRgb should be readable.

Arne



Back to comp.lang.java.programmer | Previous | Next | Find similar | Unroll thread


Thread

Re: Uppercase methods names Arne Vajhøj <arne@vajhoej.dk> - 2017-01-30 21:20 -0500

csiph-web