On Tue, Jan 6, 2009 at 10:53 PM, Manish Jethani
<[email protected]> wrote:
> The first enhancement I can think of is a language extension called
> 'properties'.
>
> private var _myProperty:int = 0;
> public function get myProperty():int
> {
> return _myProperty;
> }
> public function myProperty(value:int):void
> {
> _myProperty = value;
> }
>
> This pattern is so common, it could be a language feature.
>
> public property myProperty:int = 0;
Manish - why not just write:
public var myProperty:int=0;
It has exactly the same effect!
There is no difference in AS3 - from an interface perspective -
between a setter/getter pair and a public var.
There's no difference between what you're terming a 'property' and a public var.
Ian
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders