Hi all,

Leif pointed out that I've been doing this, and now I'd like to propose this as 
an official style guideline.

        Within a class member function, access to class members should use the 
explicit "this->foo" syntax.

The rationale for this is that it makes it blindingly obvious that class 
members are being accessed in a way that naming conventions do not. We do not 
have a consistent naming convention for member variables, and at any rate, 
those conventions never apply to accessing member functions. Our code is often 
difficult to read because it takes a long time to figure out whether names that 
are in scope are members, local variables, or file-locals.

Obviously, there are cases where using "this->" is overkill, so I'm happy for 
this to be a judgement call.

J

Reply via email to