Thanx for the advice.... I never thought of aBlah, theBlah, etc... That life
could be this simple ;-))...
Agree with the _Blah... It's too much C.... and typing an _ isn't very
fast...
Sorry... This is getting a little bit out of topic I think..

Mvgr,
Martin

-----Original Message-----
From: Conor MacNeill [mailto:[EMAIL PROTECTED]
Sent: Wednesday, January 03, 2001 1:30 AM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: RE: Additions changes to the taskdefs.


Martin,

> Now a coding question :
>
> In some (didn't check them all btw). The init of an instance variable is
> done with this.Blabla = "bla";
> Only in the code this.Blabla is never used, only Blabla (it works
> I know..).
> Is it just my horrible view on programming or it "nicer/neater" to use
> this.Blabla anywhere to reference the instance variable?
> (I'm using a lot of the same variable names (bad in thinking one
> up, and the
> dummy1, dummy2 isn't very descriptive) and using the this. is pretty nice
> then).
> Let me know what you're opinion about this is..
>

Ahh, love those style questions.

My personal preferences:

I tend to use this.blah only when blah by itself would be ambiguous. This is
usually the case in the setter for blah and perhaps a constructor in which a
value for blah is passed. It saves me thinking up new variable names which
are usually contrived; something like aBlah, theBlah, newBlah, _blah, etc. I
don't like the use of this.blah everywhere. When I am reading the code for
an object (class), I like to "live" in it, to assume its context and
this.blah just becomes distracting. Nor do I like the use of _blah to
distinguish private fields but some would disagree (Simeon?).

Your religion may vary.

Conor


Reply via email to