Hello:

Actually, my use of "this" is deliberate, it is the convention we use at
work and my personal preference as well. 

I am happy to use the convention of a given file/package/component of
course, but since this is new code, I though I'd give it a go. 

The main reason I use object.message() even when object = this, is that
I always think of sending a message in to an object. Granted Java takes
some shortcuts with primitives but I like to see things consistently:
object.message(). There is also a tricky issue that has to do with how
static methods are resolved that I do not recall right now (it has to do
with what happens you methods move around in edit/compile cycles.)

Gary

> -----Original Message-----
> From: Stephen Colebourne [mailto:[EMAIL PROTECTED]
> Sent: Monday, August 22, 2005 11:44 AM
> To: Jakarta Commons Developers List
> Subject: Re: svn commit: r234385 -
>
/jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/text
/S
> trTokenizer.java
> 
> [EMAIL PROTECTED] wrote:
> > -            if (ignoreEmptyTokens) {
> > +            if (this.isIgnoreEmptyTokens()) {
> >                  return;
> >              }
> > -            if (emptyAsNull) {
> > +            if (this.isEmptyTokenAsNull()) {
> >                  tok = null;
> >              }
> 
> While I understand most of the change here, with the use of methods
> rather than direct field access, I dislike the above.
> 
> The 'this.' just seriously gets in the way of reading the code and
adds
> nothing of value. Perhaps it is just an artifact of a tool you used?
> 
> Stephen
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


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

Reply via email to