Quote:Original post by Lotus
I do not think the prefix m_ is that bad though, it does help avoid having to rename setter method parameter names to avoid conflicts, as well as make the distinction between temporary and class-level variable.
If you really believe that, your functions are too long.
Quote:As a general advice, if you're really interested in OO design then try to get your hands on the GOF (if you haven't already done so).
GoF is a patterns book, not an OO design book.
Quote:Original post by mwnoname
I agree with MadsGustaf and Lotus that the m_VarName or mVarName are useful and do contain valuable information as to whether the variable is a local or a member variable without having to look back at the class. Many company style guides I've seen will require this in code.
Many company style guides are crap.
Quote:I disagree that Get and Set functions are not valuable, they make it easier to refactor code at a later date.
Get* and Set* are semantic code smell; prefer action methods that localize the behavior within the class. There is virtually no reason to allow an external piece of code directly set a private member variable.