You always compare "implicit getter/settter" with "explicit getter/setter".
Just a thought of mine is to compare "implicit getter/setter" with
public variables.

When you use someClass, that was written by someone else, you do not
know if the following code uses "implicit getter/setter" or is just a
public variable:
someClassInstance._fancy = 10

If it is an "implicit getter/setter", it can do for example some kind
of event handling, like like calling onFancy() or broadcast("onFancy")
everytime you set the _fancy property.

So "implicit getter/setter" are hiding such things effectivly from the
user of you classes.

Matthias

2007/2/14, T. Michael Keesey <[EMAIL PROTECTED]>:
One of the few reasons to use explicit getters/setters in AS2 is as
part of an interface. AS2 does not allow implicit property getters and
setters in interfaces.

// Will not work in AS2:
interface Ratio {
   function get percent():Number;
}

// Will work in AS2:
interface Ratio {
   function getPercent():Number;
}

Fortunately, AS3 has remedied this problem.
--
Mike Keesey
_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to