Re: Java Programming Conventions, was Re: WOPopUpButton
Re: Java Programming Conventions, was Re: WOPopUpButton
- Subject: Re: Java Programming Conventions, was Re: WOPopUpButton
- From: Ian Joyner <email@hidden>
- Date: Mon, 25 Jun 2007 10:48:54 +1000
On 22/06/2007, at 7:27 PM, Paul Lynch wrote:
On 22 Jun 2007, at 03:39, Eric Robinson wrote:
Whether you like it or not, infix caps, or camel case, are part of
the Official Code Conventions of the Java Programming Language,
seen at http://java.sun.com/docs/codeconv/html/
CodeConventions.doc8.html#367 .
I hadn't seen that arrangement of Sun's official code conventions
for Java, but I did notice that it was inconsistent in several
places with itself, as in the use of white space within lines. The
document mostly uses:
if (condition) {
Whereas in this thread, and in code that I often see from other
developers, I would say that the norm is:
if( condition ){
Which makes me very uncomfortable. I am curious as to people's
personal preferences, and reasoning behind them.
Ditto. I'd be interested to see if there are any reasons for this, or
if it is just another computing world just has to be different.
People also parenthesize their method arguments this way, but I think
this is a very recent phenomenon (within maybe five years).
Actually the parentheses are just a syntactic replacement for 'then':
if condition then
...
end
which I actually think is less keystrokes, but who cares when an
editor generates most of the syntactic junk for you now.
This is Java, not typesetting, so typographical arguments will
receive short shrift.
Oh, I think the typographical argument supports if (condition), etc,
since parentheses are designed to wrap around the text. Similarly
[ and ] (now that's a valid use of space), not sure about { and }
though?
One of the dumbest typographical conventions is putting . and ,
before ". Even the well-renowned Chicago style manual recommends
this. Why? Because on on typesetting machinery, the combinations ".
and ", could fall off the ends of lines on metal presses, so ,"
and ." were used instead. It's about time that technological
absurdity was done away with.
Ian
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden