When accessing instance variables or properties of a class from within the class itself, do you prepend them with \"this.
\"?
No, but then I write a lot of VB ;)
About the only time I'll check this/Me is when I don't remember the exact name of the member or when I need to distinguish it with a function parameter of the same name.
It adds clutter. So no.
I do, for me it adds a bit of clarity to the code, is it in the current procedure or the class?
I do. I got in the habit back when Intellisense in Visual Studio wasn't as clever as it is these days.
I don't find it distracting, I suppose because I write a lot of Python and am used to seeing self everywhere.
Yes, if I see this. I'm sure it is local and I do not need to look any further. If it isn't prefixed with this. (or maybe '_') I have to check if it is declared locally or in an ancestor or if it's a parameter or ...
All these checks take a little more time during debugging...
If your instance variable name is same as method argument- it is no longer "simply a reason to clarify". If you don't do prepend- it can lead to defects.
I think that's what Ben S meant- but just wanted to stress- that its not a matter of best practice any more.
I often do- increases clarity. I don't think it adds to clutter- because our brains quickly reads past it, but registers that it is an instance variable