Perhaps you should consider that the people who came up with Android's
convention had a lot more Java experience under their belt than the
people who came up with Java's convention had, way back when.

I'm  not saying that makes the case, just that your argument-from-
authority here falls flat.

As for your observation: OK, since you put it that way, I trust you
won't take it harshly when I say you're 100% wrong. :)

Those of us who write well-factored classes with small methods and
clear responsibilities, still have to read code from those who don't.
Including a lot of code from Sun; have you read any of their crypto
code?

It's a convenience, even with short methods. Not having to interrupt
your reading and scan up 3 lines to the front of the method to see if
it's a local -- or worse, having to search through the file to
determine if it is static or instance -- is a convenience. It makes
reading the code more efficient. That's all.

And at a very low cost, which makes your protests sound strange to my
ears. Nothing to protest here, move along now...

Now if someone where to claim you are doing something wrong by NOT
including prefixes, you'd likewise be justified in suggesting they
find better uses for their time. I claim it's not even important for
this or many style rules to be applied consistently across a project.
I try to stick with the style I find -- and if that varies across a
project, it doesn't throw me in the slightest.

The only one I get dogmatic about is the tabs/spaces things. Tabs
screw things up and make code readable in many environments. Use
spaces. End of story. It makes many tools easier to work with if
there's rough agreement on indentation amount.

Otherwise, arguing about styles is a waste of time, unless you can
demonstrate that violating a rule leads to bugs. Yes, I'm aware of the
irony of spending time to point that out.

On Feb 23, 12:07 am, Kaj Bjurman <[email protected]> wrote:
> I don't buy that argument since since all of the core classes in Java
> are written without prefixes of any kind, and many of the classes were
> implemented before IDEs became popular. I do also think that the
> convention would have been added to the "Code Conventions for the Java
> Programming Language" (http://java.sun.com/docs/codeconv/html/
> CodeConvTOC.doc.html) if Sun thought that it added some great value.
>
> One thing that I have observed (it could be 100% wrong, but it's based
> on reading Java code since the language was released in 1996) is that
> most people who think they need prefixes and odd conventions write too
> long methods, or too complex logic, and often in combination with
> classes that are doing more than one thing. There's not need of
> prefixing if your methods are short and easy to read (IMHO).

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" 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/android-developers?hl=en

Reply via email to