Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #36230 > unrolled thread
| Started by | Arne Vajhøj <arne@vajhoej.dk> |
|---|---|
| First post | 2017-01-30 21:20 -0500 |
| Last post | 2017-01-30 21:20 -0500 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.java.programmer
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: Uppercase methods names Arne Vajhøj <arne@vajhoej.dk> - 2017-01-30 21:20 -0500
| From | Arne Vajhøj <arne@vajhoej.dk> |
|---|---|
| Date | 2017-01-30 21:20 -0500 |
| Subject | Re: Uppercase methods names |
| Message-ID | <o6os8o$1vbl$1@gioia.aioe.org> |
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 top | Article view | comp.lang.java.programmer
csiph-web