Tom Tromey wrote:

> My understanding is that there are a few ok styles.  They are all
> derived from the GNU C style.  The differences seem to be:
>
> * Whether methods are indented or put in the left column

I'd like to always have methods indented. To me, this makes it a bit easier
to distinguish methods in inner and anonymous classes from code in their
enclosing context.

> * Whether there is a space before a '(' in a method call

I also don't have much of an opinion either way on this one. For the
reformatting I am going to use the space, because that is indent's default
and it matches the official style. However I tend to not use a space in my
own code. Indent can do it either way - use the -npcs option to disable the
space.

> I don't know that it has been written down anywhere.

It goes something like:

- two space indent for methods and classes
- open braces ('{') go on a new line
- if/try/for/synchronized blocks are indented four spaces (the braces are
indented two spaces, then the code an additional two spaces)
- basically follow the GNU C style except for the method indenting

regards

  [ bryce ]



_______________________________________________
Classpath mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/classpath

Reply via email to