Path: csiph.com!aioe.org!.POSTED!not-for-mail From: =?UTF-8?Q?Arne_Vajh=c3=b8j?= 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: References: 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 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: unless the abbreviation is much more widely used than the long form, such as URL or HTML 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