-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi all!
We have a gap in our naming convention guidelines we'd like to fill in.
How do you like to designate private member variables and methods of a
class?
Currently, there are varying styles used in the code.
Style #1:
The m_ prefix style (see Diagnostics_area)
class Diagnostics_area
{
...
private:
/** Message buffer. Can be used by OK or ERROR status. */
char m_message[DRIZZLE_ERRMSG_SIZE];
...
}
Style #2:
No name difference between public and private members
Style #3:
Use of an underscore prefix (proposed to be used)
This would look like:
class MyClass
{
private:
/** Our internal Foo object. */
Foo _foo;
/** Helper method to initialize our foo. */
void _initFoo();
public:
Foo &getFoo() {return _foo;}
}
Style #4:
Have a style you prefer? :)
Personally, I am a fan of using a single underscore prefix for
designating private members. I personally find it makes it easy to
differentiate private local member variables of a class with global
variables (and there are a ton of them...) outside of the class itself.
But, we want to hear folks' thoughts on this.
Do you have a favorite style?
If we can agree, I'll add it to our coding guidelines on the wiki.
Cheers,
Jay
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAknLofYACgkQ2upbWsB4UtFYIwCcDnuOGojgnIXtaU8uNt5p5XuE
pNEAoIH3mQDn3ehJzPio9uVZcUdc00i+
=pNC7
-----END PGP SIGNATURE-----
_______________________________________________
Mailing list: https://launchpad.net/~drizzle-discuss
Post to : [email protected]
Unsubscribe : https://launchpad.net/~drizzle-discuss
More help : https://help.launchpad.net/ListHelp