Re: Consistent argument naming
Andrew Kohlsmith <[email protected]>
| Newsgroups | gmane.comp.java.xwt.widgets |
|---|---|
| Organization | Benshaw Canada |
| Message-ID | <[email protected]> |
> Should we always use 'v'?
-1. IMO the variable name should make some kind of sense. I tend to use s
for string, b for bool, and i for int for my simple functions.. However,
things like
> _focused = function( f ) { ... }
> _selected = function( s ) { ... }
I see as far more useful. I use this kind of naming in the widgets myself;
f for the new focusable state, s for the new selected state, etc. To me,
that makes 10x more sense than an arbitrary variable name that means
nothing except "variable" -- well duh, I knew that much. :-)
Regards,
Andrew