logo

I hate Java

I really do. Each time I think "it might be a good idea to do this in Java" I regret it eventually. Java programming feels like programming while wearing a straightjacket. Why? Bureaucracy.

Exceptions

I don't want to catch all exceptions. I simply don't. "But the programmer wanted to tell you something whenever he used throws..." - bla. He didn't. Most likely he used some JFC-Classes and just throws the exception upward. How often have you written catch (Exception e) { // TODO: error handling } ? I know you have. Please - don't make me do this. Just terminate the application for me if I forget to catch an exception on it's way up the stack.

const

Why doesn't Java have a "const" modifier? I can't just copy an object without implementing a stupid interface to prevent you from messing with my data. My guess would be that the typical Java programmer can't grasp the difference between "const" and "static".

interfaces

Damn how stupid is this? Face it, "interface" is just another name for "multiple inheritance", just without the fun part. You can't have non-static members, you can't provide a partial implementation... just so that stupid poeple can have their life made easy for them. If I had a dime for every line of unecessary copy 'n pasted code that cost.

enums

I want enums. I want them just the way they are in C++. I want the typesafety they provide, I want to be able to iterate on them. And no I don't think public static final int foo = 1; is enough.

update
I hear they do have enums now... might check them out sometime

... and check them out I did.
Typesafe Enums with any value might sound nice on paper, and I am ever so thankful you implemented them, but please, pretty pretty please give me my C++ style enums. I want them to be integers, I know they are integers, and I want to be able to use them to index arrays, fuckers!.

memory management

What memory management you ask? That's exactly the point. Sometimes I'd like to know where my data is in memory. Ever tried to use glDrawElements? FloatBuffer my ass. "But I don't want to manage my own memory..." - in C++ I can implement a simple garbage collector in below 50 lines of code. I can even use ultracool tools like FluidStudio's mmgr to help me find memory leaks.

So what to do?

Java might be a good programming language for many, many applications, I just haven't found any yet. If I want raw speed and control I choose C++, if I want faster development and generally less pain in the ass I choose scripting languages like PHP. Java might actually be the best solution for "enterprise programming", but that's in large parts because everybody and their sister uses it. I think I could actually manage not to be physically sick whenever I have to code Java if the Java developers and Users just wouldn't be such dicks about their language. It sucks. Just like every other language out there.
It might actually be that I hate the player, not the game. Let me recount a conversation I just had with a Java Guy:

me: "const would be nice to have in Java..."
Java Guy: "Java already has that, it's called final!"
me: "nope, it's not, see..."
JG: "if you need this your design is bad!"
me: "that's a bold statement, don't you think?"
JG: "If you want that just don't use Java, use C++ instead!"

See what I mean? I hate that. Perfectly reasonable poeple become total dicks whenever someone criticizes "their" language.

Comments

Add Comment

name:
email:
homepage:
comment:
Please enter the following code into the "verify" field below:
Verify: