Namespaces, file names,...
blaisepascal at gmail.com
Fri Sep 5 11:26:48 EDT 2014
On Fri, Sep 5, 2014 at 11:08 AM, John Ralls <jralls at ceridwen.us> wrote:
> So the question becomes:
> * Is Gnc OK for the namespace name?
> * Do we want to use camel-case or underscore-separated function and
> variable names?
> N.B. The C++ code above mirrors the old C code to emphasize the different
> naming and calling conventions. The actual C++ code will be somewhat
When every method name has to be Hungarian-notated to work with
pseudonamespaces, short namespace abbreviations make sense.
But with true namespaces, using directives, and namespace aliasing
available in C++, I see benefits in readability to use full length names
for namespaces (like GnuCash::Account instead of gncAccount or
Gnc::Account. There's less likelyhood of collision with, say, a library
written to support the General Nutrition Centers (GNC) chain of stores.
While I personally prefer snake_case to camelCase, I think that the
idiomatic C++ tends to use camelCase.
More information about the gnucash-devel