On Wed, Dec 10, 2008 at 4:01 AM, Steven Sacks <[EMAIL PROTECTED]> wrote:
> That being said, I don't abide by the retarded rule that you shouldn't have > public vars in a class. People who do this > > private var _foo:Boolean; > public function get foo():Boolean { return _foo; } > public function set foo(value:Boolean):void { _foo = value; } > > are masturbating and I'm not impressed by their bloated ego...I mean code. > ;) It is incredibly rare that I agree with Steven. :-) I do on this one, as I said earlier - although I might not have expressed it like that. That pattern - as above - which wraps a private property up as a couple of methods is exactly what happens with explicit setters/getters (getVar(), setVar()) _all the time_ in Java simply in self defense, because changing from a public property to a getter/setter breaks the API of your class (and so you need to rewrite all the classes using it). Which is why in this instance AS is head-and-shoulders over Java. Ian _______________________________________________ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders