This is the mail archive of the
libstdc++@sourceware.cygnus.com
mailing list for the libstdc++ project.
Re: Coding standards
- To: libstdc++ at sourceware dot cygnus dot com
- Subject: Re: Coding standards
- From: Gabriel Dos Reis <dosreis at cmla dot ens-cachan dot fr>
- Date: 02 Dec 1999 16:19:38 +0100
- Organization: CMLA, ENS Cachan -- CNRS URA 1611 (France)
- References: <199912010018.QAA13159@haight.constant.com>
- Reply-To: libstdc++ at sourceware dot cygnus dot com
Benjamin Kosnik <bkoz@cygnus.com> writes:
| Since I didn't make these standards up, and since I don't especially
| like some of them myself, perhaps this issue should really be
| addressed. It is my strong preference not to get into a coding
| standards/formatting holy war at this time, but would rather wait till
| after the next snapshot, at the very least.
Seconded.
[...]
| 9) I disagree strongly. Declarations are all in one line in
| C, and member function declarations should work the same way. I
| see that people have been ignoring this rule anyway.
|
| I respectfully disagree with you, out of a frustration trying to get
| stuff like this on one line:
|
| template<class _Traits>
| basic_istream<char,_Traits>&
| operator>>(basic_istream<char,_Traits>& __in, unsigned char* __s)
| { return (__in >> reinterpret_cast<char*>(__s)); }
|
| Believe me, these member function names are HUGE, the argument lists
| are long, the return values and types are unwieldy, the inclusion of
| templates and having to provide a class-qualified name all end up
| requiring some kind of typographical convention beyond what is
| established practice in C. I've tried it both ways, and have grown to
| prefer the style as outlined in C++STYLE item 9.
The fact that people insists on applying GNU C Standard rules to C++
programs, where obviously they can't apply as they are always puzzles
me. I'm not saying we should throw away C rules altogether; we should
recognize that there are cases in C++ where they are simply ridiculuous.
The case above is one of them.
-- Gaby
PS: I'm sorry if this reply is somewhat late but we're having serious
connection problems in Cachan.