ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mariusz Nowostawski <mari...@marni.otago.ac.nz>
Subject Re: Ant Coding guidelines
Date Tue, 15 Jan 2002 15:07:21 GMT
Steve Cohen wrote:

> [...]  Since I've
> moved over to java, I have tended toward a style of trying to always
> prefix fields with "this.", whether "necessary" or not.  That seems
> stronger than "m_" even if it's more typing since it means something in
> the language, it's not just a convention.  It sort of surprises me that
> I have come to prefer this style - earlier I wouldn't have been caught
> dead using a style like this.  But I do prefer it now.  Especially when
> I'm reading code.   
> 
> Does the Sun style guide say anything about this?

Same here. In our research team we are using "this." as a prefix and we 
all like it a lot: simple, uniform, verbose and explicit. Very easy to 
read someone else's code. Different editors usually highlight the phrase 
"this." which makes it even more explicit and nice to use. No chance to 
get into nasty errors or name conflicts. It is similar to the use of 
"final" - it is part of the language, it improves style and reduces 
errors, thus it should be used.

To me it should be the preferred style (Sun Jawa style) but I do not 
think this is the case though.

Mariusz


--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message