Re:Google's updated Java coding guidelines
by frou_dh on Wednesday January 29, 2014 @10:47PM
(#7148966)
} else {
just looks too good to be wrong. I used Allman style for my first ~10 years of programming, then switched to "compact" style†, and didn't find it a big deal to adjust. Brace concerns melt away just like parens do in Lisp.† I think K&R does make use of new line braces, for functions.
Re:Google's updated Java coding guidelines
by Hovertruck on Wednesday January 29, 2014 @10:37PM
(#7148933)
Reading code with K&R braces is almost unbearable to me. I don't really know why, it just seems like a wasted line and visual clutter when reading code.
http://www.experimentgarden.com/2009/07/facts-behind-code-in...
It is amazing the old-style K&R still persists. I think there was one more reason it was preferred in the early days which is not mentioned in the aforesaid link: storage space which was also expensive. The K&R style saves a new-line char which would be a significant saving in large codebases.