Re: The start of a C/C++ adventure...
On Tuesday, 16 July 2013 09:10:58 UTC+1, Ian Collins wrote:
Jorgen Grahn wrote:
I'm personally more on your coworkers' side. In particular I dislike
encoding type information into names, so:
CAxis* AxisA
Axis* AxisA // useless 'C' prefix (from a non-Microsoft perspective)
It is amusing when someone who likes an IDE with intellisense that can
tell you what a type is still uses that strange (to a non-windows
programmer) style..
It depends. Where I currently work, we use one letter prefixes:
B for basic classes, S for structs (which reveal all of their
data) T for class templates, G for namespaces and A for (machine
generated) archive classes. I was against it at the start, but
in practice, it seems to actually be useful: I'd add I for pure
interfaces and F for functional objects, however.
It also means that class names start with two capital letters,
which allows them to be differentiated from function names.
(I was against starting function names with a capital letter,
since this meant that they couldn't be distinguished from class
names. And distinguishing them from class names was more
important than distinguishing them from variables. But with the
above conventions for classes, etc., there's no real problem.)
And intellisense doesn't tell you whether a class has all data
members public, or only pure virtual functions and no data.
--
James