This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: socket timeout patch
- From: Eric Blake <ebb9 at email dot byu dot edu>
- To: Nic Ferrier <nferrier at tf1 dot tapsellferrier dot co dot uk>
- Cc: tromey at redhat dot com, java-patches at gcc dot gnu dot org
- Date: Wed, 12 Dec 2001 15:12:37 -0700
- Subject: Re: socket timeout patch
- Organization: BYU Student
- References: <E16EHUx-0000RO-00@tf1.tapsellferrier.co.uk>
I thought that the libstdc++ coding standards applied to both the native
C++ code and the Java code in libjava, and in the parent Classpath
project; except that naming conventions in Java follow Sun's
suggestions. Am I wrong?
Libstdc++:
http://gcc.gnu.org/onlinedocs/libstdc++/17_intro/C++STYLE
Sun's Java standards (only the naming conventions apply to Java code):
http://java.sun.com/docs/codeconv/html/CodeConventions.doc8.html
Keep in mind that the libstdc++ coding standards specify some things
differently for C++ than for C. For example, C++ formatting requests
that method calls have no space before the open parenthesis:
03. Function names and parentheses
void mangle()
-NOT-
void mangle () // wrong
Reason: no space before parentheses (except after a control-flow
keyword) is near-universal practice for C++. It identifies the
parentheses as the function-call operator or declarator, as
opposed to an expression or other overloaded use of parentheses.
However, I've seen both formatting styles in libjava (and in Classpath);
it would be nice to come to a consensus. Which format is official?
Nic Ferrier wrote:
>
> >By and large I think the existing formatting of these files is ok.
> >They look "conforming enough" to me.
>
> I hadn't realised that the space was required between keywords and
> brackets. I think I saw some code without that convention (maybe
> elsewhere).
>
> The GNU code standard says that there should be a space before every
> bracket, here's the example piece of code that is used:
>
> Nic
--
This signature intentionally left boring.
Eric Blake ebb9@email.byu.edu
BYU student, free software programmer