Since the advent of AS3, I have been working like this:
private var loggy:String; public function getLoggy ():String { return loggy; } public function setLoggy ( loggy:String ):void {
and avoided working like this:
private var _loggy:String; public function get loggy ():String { return _loggy; } public function set loggy ( loggy:String ):void {
I avoided the partial use of the implicit AS3 get / install methods so that I could just start typing “get ..” and the content assistant will give me a list of all my get methods, as well as my installers. I also don't like the underscores in my code that disconnected me from the implicit route.
Another reason is that I prefer to feel this:
whateverObject.setLoggy( "loggy awesome new value!" );
to that:
whateverObject.loggy = "loggy awesome new value!";
I feel that the former better reflects what is actually happening in the code. I call functions, not set values ​​directly.
After installing Flash Builder and the great new SourceMate plugin (which helps to get some useful features known to FDT in FB), I realized that when I use the “create and get methods” function of SourceMate, it automatically installs my code using an implicit route:
private var _loggy:String; public function get loggy ():String { return _loggy; } public function set loggy ( loggy:String ):void {
I believe that these people from SourceMate should know what they are doing, otherwise they will not write plugins to improve workflows for coding in AS3, so now I question my ways.
So, my question to you is: can someone give me a good reason why I should abandon my explicit g / s methods, start using the implicit technique and use these little smelly _underscores for my personal changes? Or support me in my reasons for doing what I do?