I personally prefer to use it, as it makes it clearer for me later when I
come back as to what is a class member/function and what is in the
local/global scope. I say use which one you prefer. I came from a java
background, and I remember always using 'this' with java classes. But that's
just my 2 cents. :) It can be helpfully for when you come back to code and
you're trying to remember what you did.

On Tue, Apr 8, 2008 at 4:51 PM, Bjorn Schultheiss <
[EMAIL PROTECTED]> wrote:

>   drop the 'this' unless its necessary to explain something..
>
>
> On 08/04/2008, at 5:39 PM, Mike Anderson wrote:
>
>
> Greetings All,
>
> Whenever I study code generated by seasoned programmers (i.e. all the
> Adobe people supporting Flex on this list) as well as countless others on
> this list, I notice that some use "this" when referencing local variables
> contained within a Class.
>
> The last thing I want to do here, is start a heated discussion regarding
> "best practices" for programming.  My goal on a daily basis, is to better
> myself as a programmer, and I want to make sure that the code I create,
> conforms to certain standards.
>
> Could some of you please offer your 2 Cents regarding the
> advantages/disadvantages of using "this"?  Just a quick example:
>
> package
> {
>     public class myClass()
>     {
>         private var testVar:String;
>
>         public function myClass( value:String )
>         {
>             this.testVar = value;
>             // versus:
>             testVar = value;
>         }
>     }
> }
>
> Thank you all so much in advance, for any help you can offer regarding
> this topic.
>
> Mike
>
>
>
>  




-- 

"Every child has many wishes. Some include a wallet, two chicks and a cigar,
but that's another story."

Reply via email to