Just to fuel your query, how does it affect the user to know whether
they are 'get'-ing from a variable or a function call, encapsulation
considered?

P.

>> -----Original Message-----
>> From: [EMAIL PROTECTED] [mailto:flashcoders-
>> [EMAIL PROTECTED] On Behalf Of Holth, Daniel C.
>> Sent: Tuesday, February 13, 2007 3:32 PM
>> To: [email protected]
>> Subject: [Flashcoders] Coding Standards: Use of Get/Set
>> 
>> 
>> I was wondering what people's thoughts were on the use of "get" and
>> "set" functions.  I personally have felt that creating functions such
>> as:
>> 
>> public function get theLetterA(){
>>      return "a";
>> }
>> 
>> so the user can simply call someObject.theLetterA are confusing
because
>> the user doesn't know if they are doing a function call or accessing
a
>> public variable.  I prefer writing functions such as:
>> 
>> public function getTheLetterA(){
>>      return "a";
>> }
>> 
>> So the user needs to explicitly call the function
>> someObject.getTheLetterA().
>> 
>> Are there advantages to using "get" and "set" that I'm not seeing?
>> 
>> 
>> I ask because I was always use getVariable() functions and started
>> reading ActionScript 3 with Design Patterns and the authors (as well
as
>> many others I've read) are using "get" and "set" functions.
>> 
>> 
>> Daniel Holth
>> I.S. Programmer
>> 
>> 
>> 
>> This e-mail and its attachments are intended only for the use of the
>> addressee(s) and may contain privileged, confidential or proprietary
>> information. If you are not the intended recipient, or the employee
or
>> agent responsible for delivering the message to the intended
recipient,
>> you are hereby notified that any dissemination, distribution,
displaying,
>> copying, or use of this information is strictly prohibited. If you
have
>> received this communication in error, please inform the sender
>> immediately and delete and destroy any record of this message. Thank
you.
>> _______________________________________________
>> [email protected]
>> 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
_______________________________________________
[email protected]
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