
Hi all, I am busy 'improving' a small part of the code to use an underscore for class members. I think this helps fight bugs when converting C functions to class methods. For example, a SPPath function may define a temporary variable 'curve', but that one will hide the class's own 'curve' variable (inherited from SPShape). Since the class hierarchy is quite long at places, this is not so easily spotted. So I think the _* stuff for members is really nice and clarifies code a lot.
However, now I read in our codestyle document:
* Underscore as first character of identifiers Please consider that the C++ standard reserves _* identifiers [17.4.3.1.2]: "Each name that begins with an underscore is reserved to the implementation for use as a name in the global namespace".
Hmm, quite a large part of our codebase already uses _* to signify class members. I think this is somewhat common practice? Do we agree to ignore this text in the C++ standard? And shall we change our codestyle text to indicate that we use _* to indicate class members?
(I hope this does not result in long maillist discussions... Please answer yes or no. I am already convinced that _* is better than without, and cannot be convinced otherwise. (I _may_ consider 'm_' but it is perhaps overly verbose?))
Thanks, Johan