Skip to main content
2 of 8
added 308 characters in body
Doc Brown
  • 214k
  • 34
  • 394
  • 603

I suggest not to do this. This gives reader which is not familiar with your macro a big "WTF" whenever he sees this. Code does not get more readable when inventing "new conventions" over the generally accepted ones without any real need.

using this-> everywhere is too noisy and ugly

That may seem to you so, maybe because you did a lot of programming in languages using the keyword me (Visual Basic, I guess?). But in fact it is just a matter of getting customized to it - this-> is pretty short, and I think most of experienced C++ programmers will disagree about your opinion. And in the case above, neither the use of this-> or the use of me is appropriate - you get the smallest amount of clutter by leaving those keywords inside the member functions away.

If you want your private member variables to be distinguished, add an _ or m_ as a prefix before them (but as you can see here, even this convention is "too noisy" for many people).

Doc Brown
  • 214k
  • 34
  • 394
  • 603