Real Ultimate Programming

The Home for People Who Like to Flip Out and Write Code

Five Things I Hate About Java

I’m sure you’ve all seen the Five Things meme. Here’s the five things I hate about Java.

1. Lack of Type Inferencing

There’s just enough generics-related type inferencing to leave me wanting more.

2. No First-class Functions

I don’t care if there are patterns for doing this, it’s not very idiomatic, and the boilerplate obscures the intent of the code, which largely defeats the purpose.

3. No Read-Eval-Print Loop (REPL)

I can’t praise the REPL enough. Java should have had one of these in the JDK in 1.0.

4. Checked Exceptions

The standard library is riddled with checked exceptions that really should have been unchecked, and third-party libraries have followed suit. In fact, Exception should have been unchecked and we should have CheckedException as a subclass instead of RuntimeException.

5. Array Covariance

It’s broken. Especially now that Java has covariant returns (thanks Java 5!), this bothers me just often enough that I’ve forgotten how broken it is right before I need/want it.

Honorable Mention: No Tail-call Elimination

This very nearly bumped Array Covariance. I really wish tail-call elimination would catch on in mainstream languages.

Back to flipping out…