Java

Shane Hathaway shane at hathawaymix.org
Fri Feb 16 11:00:06 MST 2007


Bryan Sant wrote:
> On 2/13/07, Shane Hathaway <shane at hathawaymix.org> wrote:
>> Do you also agree, then, that readability is more important than
>> shortcuts for writing code?  Eclipse shortcuts help with writing code
>> but do not make up for Java's verbosity.
> 
> Readability is hugely important.  This is why are am a huge fan of the
> Java culture, and their tendency to use
> veryDescriptiveNamesForVariablesAndMethods.  Long, descriptive names
> are a good thing.  Self documenting code is a goal we should all
> strive for.  Java's verbosity is a tremendous benefit.

Those long method names hurt polymorphism.  It's better to have a small 
set of short names that get used often.  Python's dict and file APIs are 
a good example; people try to reuse those method names wherever 
possible, and the result is that Python code tends to be quite 
interoperable.

> Though java has long-ish key words, Java is verbose mostly because of
> the long class and method names used in the standard libraries and by
> most developers, however, there is nothing stopping you from using
> Java in a terse way.

The Java culture stops me.  When I write Java code, I am a member of the 
Java community and must behave as one, even if I disagree with some of 
the practices.

> So, yes, readability is very important.  Java's verbosity improves
> ones ability to read Java, and IDE's make the verbosity a non-issue
> when writing java.

I suspect you're defending the status quo.  If short names were more 
common in Java, I think you'd defend short names instead.

Shane




More information about the PLUG mailing list