On 02/15/2013 11:11 PM, Frank Zhang wrote:
Current name convention of class variable in CloudStack is prefixing variable 
name with a '_', for example

Class SomeManagerImpl {
        private long _myVar;
}

I know this is widely spread convention but I really think it's dated. First time I saw 
it is in the famous book "Programming in Java Language", it helps you to 
distinguish class variable and variable defined in function in PLAIN text editor.
But nowadays everybody writing code in IDE like Eclipse and every IDE 
highlights these variables in vivid color, there is no needs to use underscore 
anymore.


I don't mind it being changed, but I for example do not work with an IDE like Eclipse but use Kate (KDE) to do my work in.

I know that others use just plain vim.

Wido

And this convention has a significant disadvantage that is broken Java Bean style. A 
Java bean is a class with setter/getter, I always use Eclipse's shortcut 
"Alt+Shift+S

Reply via email to