bug-commoncpp
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Some issues with the codebase


From: Albert Strasheim
Subject: Some issues with the codebase
Date: Thu, 2 Jan 2003 19:29:55 +0200
User-agent: Mutt/1.4i

Hello,

While looking at some of the code in Common C++, I've noticed a few 
general issues that we might want to address.

Firstly, identifier names. Here's an important quote from the C++ 
standard via mozilla.org's C++ portability guide, available at
http://www.mozilla.org/hacking/portable-cpp.html,

"Certain sets of names and function signatures are always reserved to 
the implementation:

    * Each name that contains a double underscore (__) or begins with an 
underscore followed by an uppercase letter (2.11) is reserved to the 
implemenation for any use.
    * Each name that begins with an underscore is reserved to the
implementaiton for use as a name in the global namespace."

I've seen many member variables whose names start with an underscore. As 
far as I understand, this is Very, Very Evil(TM). If you really want an 
underscore in your identifier name, stick it on the end.

Secondly, what's up with the Common C++ namespace being called "ost"? I 
assume this stands for Open Source Telecom? If another company were to 
contribute code to this project, are we going to start seeing "acme" and 
other namespaces too? :-)

I think Common C++ deserves a vendor-neutral namespace, say... mmm... 
"ccxx"? :-)

To provide backward compatability for a while, I think following 
declaration sprinkled through some of the headers will do the trick:

#ifdef CCXX_NAMESPACES
/**
 * Old Common C++ namesspace (DEPRECATED).
 */
namespace ost
{
  using namespace ccxx;
}
#endif

Don't know exactly how one convinces doxygen to add a description for a 
namespace, but anyway.

Comments?

Cheers,

Albert



reply via email to

[Prev in Thread] Current Thread [Next in Thread]