On Sun, Sep 19, 2010 at 18:03, Josh Berry <tae...@gmail.com> wrote:

>
>
> On Sun, Sep 19, 2010 at 1:43 AM, Reinier Zwitserloot 
> <reini...@gmail.com>wrote:
>
>> I usually get funny looks and stares when I argue this, but in my
>> opinion a good programming language _defines_ style rules.
>
>
>
> Meh.  I think it is a waste of time to worry about most of the style rules.
>  Not to mention, style is such a nebulous term that it is borderline idiotic
> to really try and codify it.  Imagine if you had a style for what prose
> should read like.  This is what most people try to do with programming.  :)
>  (I saw a good analogy with Jazz the other day.  Have you ever tried to
>
codify "good" music?)
>
> (not that anyone asked, but I have a few worthless thoughts on the layout
side of coding standards...)

I'm all for having a standardized code style, but I have yet to see a code
style or automatic formatting tool that doesn't
make at least some of a sufficiently large and varied code base look like
a$$. There are things good programmer can do with style/layout to guide the
reader, which by-the-letter adherence to any one code style would make hash
out of.

For Java, I hew closely to Sun's style guidelines (with 4-space indents, no
tabs), but I'm not too uptight about it. I can see the advantages of BSD
(braces on their own lines), particularly with complex conditionals or
methods with many parameters. OTOH, overly zealous adherance to BSD style
makes inner classes read badly.

For Clojure and Scheme I just do whatever emacs tells me. ;-)

For Oberon, I used hard tabs and put multiple statements together on one
line if they seemed to "chunk" [1] together. No tricks with vertical
alignment (unless one cared to explicitly set tab-stops) the standard font
(Syntax) was proportional.

[1] http://en.wikipedia.org/wiki/Chunking_(psychology)

// ben

-- 
You received this message because you are subscribed to the Google Groups "The 
Java Posse" group.
To post to this group, send email to javapo...@googlegroups.com.
To unsubscribe from this group, send email to 
javaposse+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/javaposse?hl=en.

Reply via email to