by Anonymous >> Wed, 25 Oct 2006 0:18:18 GMT
Do you prefix every property with self dot?
If so, why?
People I've asked who do this tell me it's just down to individual preference, but (and you can tell I'm one of the people that don't) ...
- it adds a stack of (in my humble option) unnecessary clutter to what could otherwise be concise and easy-to-read methods
- the properties can't be inspected in the debugger without first inspecting self, then finding the property (trying to inspect the expression self.myLuckyRabbitsFoot usually rewards you with "Sorry I can't evaluate that expression".
- you loose out on benefiting from occasional use of self dot to distinguish from some other symbol with the same name, such as a local variable.
(you can probably tell I've been maintaining more of other people's code recently than I would ideally choose to)
So what's self dot all about? Come on ye zealots and commentators alike ...