12 March 2006
Java Sucks
Java sucks.
I mean, as a language, its at least as nice as C++. But its too verbose, misses basic newfangled syntax like foreach, and has a questionable Perl-esque namespace specifying construct. package n; versus ./n/Person.java with no package shouldn’t be compilable. If subdirectories are allowed, then lose the package construct.
Lots of their standards are nice, too. Their naming conventions beat the crap out of just about anything else I’ve used. I mean, I still use Hungarian-notation everywhere, but I use it according to Java’s conventions. .net’s conventions just seem to be intentionally not-Javaâ„¢. Java makes instance methods versus static methods clear, but in .net, everything starts with a Capital letter.
And the one-class to a file requirement is nice, too. It does contribute to the overall verbosity, but that is one avenue that is excusable. When I’m looking for List::generateFilteredList, only to find that List extends AbstractList and generateFilteredList is actually a method in Records.php, Java seems pretty freaking nice.
But there’s the applaudable points of Java. All three of them. You want a list (of only three) in C++? Multiple inheritance, pre-processing, proper references. PHP can have ease-of-writing, proper scoping, implicit evaluation. Scheme has Program-is-data, proper recursion, and infinitely long expressions. Of course, those are all just the first three things to come to mind for any of those languages. In Java, that’s pretty much it. There’s a lot of stupid stuff in .net, too, but I can come up with more than three positives for C#.net. VB.net might be harder but those are mostly just syntax problems.
But the article I read to inspire this post covers Java’s deficits in much more detail. It goes well beyond the “Java doesn’t have auto-boxing” or “Java is slow” mantras that many have held on to for over a decade now. Yes, it might finally have addressed those, but its still crapâ„¢.

