views:

167

answers:

1

I'm about to write a C++ library that is to be used by a Windows application as well as on Symbian. Linux is not a current requirement but should generally be possible, too.
For this reason I would like to use the STL/Boost naming conventions instead of Symbian's, which I think, are hard to get used to.
This seems to already present a problem, when compiling the code with Carbide.c++ as it enforces the Symbian naming convention.

How can I use "normal" names and still be Symbian compatible? I first thought about conditionally re-#define-ing class names for the Symbian platform but I fear, that this will lead to confusion.

Could there occur other problems by not complying with Symbian's naming convention?

+4  A: 

Coding conventions are not strict. They are there to make understanding code easier for us humans. If you're writing a multi-platform library, feel free to use whatever convention you are comfortable with.

Of course, your library probably needs to interface with the underlying operating system in some ways. With the help of Open C/C++ libraries, you can do many things without needing to use native Symbian C++ APIs and their naming conventions.

In Carbide.c++ you may want to disable CodeScanner static analysis as it is really only useful to code written in native Symbian C++.

So in summary, the problems are as follows:

  • People coming from native Symbian C++ background are not immediately familiar with your conventions
  • Using native Symbian C++ APIs can expose some platform-specific peculiarities (exceptions vs. leaves, trap harnesses, active schedulers etc.)
  • Symbian-specific static analyzers such as CodeScanner assume Symbian C++ code style and may generate errors/warnings you really don't need to care about
laalto