So lets see if I can sum up the consensus here. There are four techniques
for accessors and mutators listed (imho) in order of suggested use.


   1. *public vars
   *
      - probably the best place to start
      - easily changed to implicit by changing to private with underscore. *
      *
   2. *brainless implicit
   *
      - In case you want a read only property. (get but not set)*
      *
   3. *implicit with brain*
      - when complex logic is needed for the return such as get date
      returning month + "/" + day + "/" + year.
      - to prevent invalid data
      4. *explicit for lookup (myObject.addChildAt())
   *
      - when multiple parameters are needed
      - when a return value may not be needed

There's probably better points for #4 but I can't think of them as it's
basically an argument for just writing a public method.

On Wed, Dec 10, 2008 at 11:18 AM, Ian Thomas <[EMAIL PROTECTED]> wrote:

> I apologise for being deviant.
>
> Oh, hang on...
>
> :-P
>
> Ian
>
> On Wed, Dec 10, 2008 at 3:40 PM, Hans Wichman
> <[EMAIL PROTECTED]> wrote:
> > hmmm no guess I didn't, been pixelstaring too long already today;)
> >
> > On Wed, Dec 10, 2008 at 4:18 PM, Merrill, Jason <
> > [EMAIL PROTECTED]> wrote:
> >
> >> >> yep that was the article, but the original poster asked a subtly
> >> different
> >> question (unless I'm mistaken).
> >> allandt asked about implicit vs explicit getters setters.
> >> >> Rereading it and
> >> seeing its about public variables vs implicit, it's a nice read ;). But
> >> another discussion:).
> >>
> >> Uh, I guess you didn't notice, I was not responding to the original
> poster
> >> - we have deviated from that.  i.e. Ian's comment, " so why not use a
> >> public? If they do matter, use getters/setters."
> >>
> >>
> >> Jason Merrill
> >> Bank of America     Instructional Technology & Media   ยท   GCIB & Staff
> >> Support L&LD
> >>
> >> Interested in Flash Platform technologies?  Join the Bank of America
> Flash
> >> Platform Developer Community
> >> Interested in innovative ideas in Learning?  Check out the Innovative
> >> Learning Blog and subscribe.
> >>
> >>
> >>
> >>
> >> _______________________________________________
> >> Flashcoders mailing list
> >> Flashcoders@chattyfig.figleaf.com
> >> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> >>
> > _______________________________________________
> > Flashcoders mailing list
> > Flashcoders@chattyfig.figleaf.com
> > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> >
>
> _______________________________________________
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>



-- 
--Joel Stransky
stranskydesign.com
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to