Quote:
Originally Posted by Novo
I think the best solution for private variables is just treating them as private. The convention you use for denoting a private variable could help you.
I basically treat all variables as private / local, and use clearly-defined functions to modify them.
|
Yea I do it about the same way. I see private variables as more of a way of making the script idiot-proof so people other than yourself don't mess it up.
Quote:
Originally Posted by cbkbud
What is thisor exactly?
|
Well if you used thisr. to reference private variables in the object, then what about when you're in a
with (object) {} block and want to get a private variable from the calling object? Normal variables would be accessed by thiso. but you would need something thisor. for the private variables of the parent object and that is just unnecessary.