Hacker News new | ask | show | jobs
by Tharkun 3326 days ago
Yet Another Java Rant.

In my book, Java is a fine language, and has been since Java SE 6 was released back in 2006. It keeps getting better, too. "Glacial" pace or not.

Whenever any kind of discussion about Java comes up, people start ranting about XML configuration or annotations. These are not language problems. These are developer problems. If you don't like XML or annotations, then don't use them. Problem solved. Very few Java features require the use of either.

I rarely run into issues with the Java language, syntax or productivity wise. I've run into a couple of Sun/Oracle/IBM bugs in my 17 years of Java development. I've greatly appreciated productivity-increasing features like try-with-resources and Streams, but the lack of those features have never held me back as a developer.

Given the sheer amount of Java code out there, I would say it deserves a little more praise and a little less negativity.

2 comments

I've also been coding Java professionally for 17 years and like you I feel Java is a great little language. What makes the biggest difference in productivity is the simplicity of the algorithm and associated object oriented design, and I've never really felt that Java was hindering me in achieving that simplicity.

I wonder how well the like/dislike of Java correlates with like/dislike of object-oriented programming. I've always loved object oriented programming but there seems to be many programmers who feel the opposite, and for them Java would be going against the grain.

Kotlin (Ceylon, C#, Nice, Boo, Groovy, etc) isn't better. Just different.

What I want, as a devoted Java partisan, is a Java (Oak) experiment do-over. More more and less less. A fantasy hypothetical effort I call Encoreā„¢.

What are the sources of programming errors? Engineer them away.

What causes the most boilerplate? Engineer those away.

I've got a laundry list that I've collected over the years. Maybe I'll scrub it for publication.

--

One specific, novel feature of Kotlin that is better, and should be swiped for every other OO language, is its automatic generation of the canonical object methods (toString, equals, etc).

Data classes are dumb though.

https://kotlinlang.org/docs/reference/data-classes.html

Why do you think data classes are dumb? The only thing I think they're missing is an automatic method to serialize to JSON or other text format, eg, so they can be easily stored in an android preference.