[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
|
[news.eclipse.tools] Re: The static field xxx.yyy should be accessed in a static way
|
"Hans Schwäbli" <hans.schwaebli@xxxxxxxxxxxxx> wrote in message
news:b7mr3k$lf2$1@xxxxxxxxxxxxxxxx
> I think it has a great advantages for readability and comprehension to
write
> code so that static fields are accessed in a static way.
I'm trying to understand what the great advantage is. Seems like a nuisance
to me. Here's another example you might not like:
Lexer lexer = new Lexer();
if (lexer.next() == lexer.COMMA) ...
In this case, COMMA is static, but it need not be, and *who cares*?
> The example you wrote is only a little side effect in my eyes.
At least it's a reason.
Bob