As a rule, I always use "this." inside constructors, but not in other methods. checkstyle has no check for it, so I'd say its fine eithier way.

Kalnichevski, Oleg wrote:

There is quite a few people out there (including myself) who prefer adding 'this.' to their instance variables in order to be able to differentiate them from local ones. I am aware there are tons of people who passionately hate this kind of convention. However, I am just wondering if it is going to be considered a violation new coding guidelines?

Oleg

-----Original Message-----
From: Jeffrey Dever [mailto:[EMAIL PROTECTED]]
Sent: Dienstag, 28. Januar 2003 02:04
To: Commons HttpClient Project
Subject: Re: [HttpClient] Proposed style change




I propose that we change the pattern for instance variables to
^_?[a-z][a-zA-Z0-9]*$ so that we will allow leading underscores but will
not insist on it.


Uuuugh, please no! Besides being ugly, it's worth sticking to the Sun
coding
style (as is the default with checkstyle). That way, anyone who has done any
Java will be immediately familiar with it.




I'd agree with Simon on this. Leading (and trailing) underscores are ugly (just look a Python!). If its too difficult to determine if a variable is a member or a local, then the method is probablly too big. And you can always prefix this to a member for clarity.



--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>


--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to