Tom Tromey ([EMAIL PROTECTED]) wrote:
> Aaron> Yes. I think all we need to do is eliminate the
> Aaron> try_not_to_block functionality and make it the default.
>
> Ok, I did that and I'm checking it in.
> Is there a Classpath cvs commit list?
[EMAIL PROTECTED]
> Aaron> I use vi as my editor, and /^methodName is just too convenient.
> Aaron> I believe the GNU standards say that function names should
> Aaron> begin in column 0 for just this reason.
>
> I doubt that -- RMS writes the standards and I find it hard to believe
> he's ever run vi :-)
>From the GNU Coding Standards:
<blockquote>
It is important to put the open-brace that starts the body of a C function
in column zero, and avoid putting any other open-brace or open-parenthesis
or open-bracket in column zero. Several tools look for open-braces in column
zero to find the beginnings of C functions. These tools will not work on
code not formatted that way.
It is also important for function definitions to start the name of the
function in column zero. This helps people to search for function definitions,
and may also help certain tools recognize them. Thus, the proper format is
this:
static char *
concat (s1, s2) /* Name starts in column zero here */
char *s1, *s2;
{ /* Open brace in column zero here */
...
}
</blockquote>
Obviously a bit dusty (note the K&R style function decl) and applicable
only to C, but still in there. vi could fit in as one of the tools that
use column 0 for searching (though of course a few extra keystrokes
can handle leading whitespace as well).
Another reason to not indent method names is that usually a Java source
file will contain only one class, but many methods. Thus almost
everything gets indented, wasting horizontal space. I personally feel
that the easy searchability, combined with the savings in horizontal
space, make column zero for method names a winner. As with almost all
coding style questions though, this is pretty much a matter of taste.
--
Aaron M. Renn ([EMAIL PROTECTED]) http://www.urbanophile.com/arenn/