socket timeout patch

Eric Blake ebb9@email.byu.edu
Wed Nov 7 09:46:00 GMT 2001


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



More information about the Java-patches mailing list