On Tue, May 3, 2011 at 4:16 AM, Kevin Wright <[email protected]>wrote:

> I'm curious... Why would it matter *where* a variable comes from?  So long
> as you know *what* it is you have everything necessary to use the thing.


Being able to tell at a glance that a variable is a field or a local is very
useful since it tells you whether that method could be static or not, or
const or not. Having different syntactic conventions for both is also useful
to avoid shadowing.

I'm glad that more and more code bases are ignoring the silly and antiquated
Sun guidelines in this area (this.foo = foo) and going back to using
syntactic conventions (e.g. Android uses mFoo, Eclipse fFoo, etc...).

-- 
Cédric

-- 
You received this message because you are subscribed to the Google Groups "The 
Java Posse" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/javaposse?hl=en.

Reply via email to