Does anyone know if there's a performance difference or advantages between:
PHP Code:
public var somevariable:String
and
PHP Code:
private var _somevariable:String
public function set somevariable(invalue:String):void{
_somevariable = invalue;
}
public function get somevariable():String{
return _somevariable;
}
While I know that in cases where you want other commands, variable settings, statement, or certain subclassing - to run when getting or setting (say an event dispatch) - this can be valuable.
I'm trying to learn why it would be done the second way (with private) if there are no other commands,etc - just basically making a private variable with public function access.
The second way seems (to me) to be extraneous, but I'm hoping someone here can explain the wisdom and/or advantages of why it should be done the second way...
Thanks in advance.
-<>|TheMadFlasher|<>-