Java is pretty cool

So, I’ve been bro’s with Java and I’ve been hanging out here for maybe a year or two now, and I have to say Java is great.

Recently I tried playing around with Python and C because I’m constantly reminded by older more experienced people that both are superior languages. To my surprise, C ran literally at about the same speed, and most importantly generally required longer code. Not to mention the fact I have to explicitly manage memory use. Python had its own kinks, while I personally found it better than C due to the fact it was relatively more fluent, I still found the code to look ugly. For example,

if a = 0: 
print "Python!"

For one, there are no brackets, but instead a single colon. I found it to bother me extremely that there was no strict closure on a piece of code, and that it kind of “hanged”. I need that closure that you get with the enclosing brackets because of that simple security it gives me! Hahah. I may be wrong, there may be a way to “close” if statements that I don’t know about, as I only played with Python for a day or two.

Nonetheless, not only does Java work simply, look beautiful in code, and take care of garbage for me, it also works on pretty much any device, and most of the libraries built for Java give me every option I could possibly want.

Enough advertising though, I’m done. Hahah.

Anyway, I guess all of this was leading to the question of why people seem to dislike Java so much? Most coders don’t consider it a “real” programming language for some reason.


  1. The “Java is slow” meme which isn’t nearly as relevant anymore as people think are, is still popular.
  2. People’s opinions are colored by early Java (slow balky applets, ugly AWT apps)
  3. There has been a backlash in the blogosphere around OOP in favor of things like FP.
  4. Likewise there has been a backlash in the use (and overuse) of Design Patterns which many people (accurately or not) associate with Java.
  5. Because Java is so prevalent in the Enterprise space it’s uncool, is associated with grunt (“blub”) programmers.

Some more reasonable reasons:

  1. Java is missing constructs that even average programmers are getting more comfortable with such as first class functions and traits/mixins.
  2. Java can be verbose compared to languages like lisp and python. Some of it is due to a lack of type inference, some of it is due to culture. Java programmers tend to give much longer names to things than programmers in other languages.
  3. Java isn’t as well suited to writing quick scripts as other languages (although you can get around this with libraries).
  4. Some people just prefer dynamic languages

I’m sure there are others.

This topic covers a lot about the likes and dislikes of Java…

Java is only disliked because its beginning iterations had a buggy interface and ambitious technologies that did not integrate well, like Applets and JNLP. It is a sulking ghost that continues to haunt Java to this day. Those people still believe that Java is a slow beast that can’t compete with today’s faster technologies.

Today, I think it is becoming more myth than anything else. Just like you sipped a bit of Python and C, it is impossible to know what a language really is like until you dive into it at least for a month (or however long it takes for you to write a basic program in it.) They probably take a look at the 5 line Java “Hello World” and say… “Man! you can do this in 1 line in .”

It is nothing against anyone, we obviously are the few people that took the leap to find out what Java is really like. In my opinion, it isn’t half bad…

This is the same thing we asked each other when we started our project, Java or C++, we chose Java with a toss of a coin and I’m secretly glad that we did.

I have to admit that I was one of those programmers who thought “Java is slow” and that 5x slow is still stuck in my head, which haunts me to this day.

Unfortunately, the horrible truth is that C/C++ itself has potential for optimization which are currently not possible in Java, especially optimization targeted for Games Programming specifically, however the gap is closing and closing mighty fast. The truth is that to make these optimization requires time and manpower, which is something that we, as indie programmers lack, so we are back to square one, a project made in C++ (which arguably will take at least 2-3 times longer than in java WITHOUT said optimization) is just as fast as same project made in JAVA.

I remember reading somewhere there are future plans to have the Java run on openCL to take advantage of parallel computing. If i’m mistaken, this is huge, especially for graphics programmers. If it is what I think it is, I wouldn’t be surprised to hear games companies jumping ship to Java instead.

Here is the link I think…

You’ve only played with Python for a couple days – you are in no position to be saying it’s a bad language.

I’ve worked with Python extensively; for general purpose programming it’s absolutely beautiful and blows Java out of the water. For software development, I’d much rather use Python and Qt than Swing/Java.

Why am I still here, then? Java wins on a few fronts:

[]Java IDEs are awesome and seamless across platforms. Much nicer to work with than any Python IDE.
]Installing/building/linking third party libraries is a breeze.
[]Performance is reliable. Some “pythonic” syntax sugar may be less verbose but exponentially slower than equivalent Java code. This is important in a game loop.
]Readability. Java is not a functional language; there are no cool syntax tricks that you can use to shorten your method by three lines at the expense of readability. Also, Java coding standards are strictly enforced: if you use method_name instead of methodName, an angry mob of pitchfork-wielding Java devs will hunt you down and destroy your soul.
[*]Third party libraries, e.g. LWJGL. One of the better OpenGL wrappers I’ve worked with (things like glGenTextures() are a nice touch). There are an absurd amount of open source libraries for Java out there, and thanks to Java’s readability, they are generally very easy to dive into and pick apart.

Reasons why I don’t like Python, and why Java blows it out of the water:

  1. Global interpreter lock, makes multithreading a huge pain. You could just fork, but their GC model breaks the copy-on-write policy used to make forking worth it.
  2. Not statically typed. It is a huge pain to work in 50,000 lines of python with multiple people and not have static type checking.
  3. I hate their dependency/library management system.

Reasons why Python is cool:

  1. Duck-typing is pretty nifty
  2. First class functions
  3. List comprehensions

I find it is the IDE and support for me that makes Java cool.

Eclipse, Netbeans and Intellij stand out. I don’t another language (maybe besides C/C++) with such a big community and support over usability and the like. There are plugins, addons, modules, tips and tricks everywhere.

It’s also ease of use - don’t have to fiddle with mak efiles and random things. Java installs fine most of the time and IDE works. Java performs great and has all the libraries and things most users will need now. Rarely a need to go lower level.

Lots of people get really strong opinions about the indent thing in python, but it really is one of the least interesting things about the language. By that I’m not saying you get used to it or that you get to love it, or tolerate it or whatever, I’m saying that when you’ve used python for a few years, you pretty much stop noticing the whole indent thing at all.

Python has lots of other problems besides a layout rule that some people dislike, and that includes duck typing without even so much as a keyword to distinguish introduction from assignment, fairly pokey performance, the GIL, and an intolerably over-opinionated screechy and self righteous IRC and mailing list culture. I decided I had enough of that culture a couple years back, and while I still prototype a lot of stuff in python, I still don’t have a lot of use for it in production.

When I do want lack of type declaration boilerplate plus enough syntax sugar to give you diabetes, I reach for Scala. It’s not all roses of course: scala compiles so slowly it makes C++ look zippy, but just leave the incremental compiler running and you usually do okay.

I’m googling it now. I’ve never heard of it.

Yeah, Python isn’t bad by any means, I just honestly didn’t like the way it felt, because I’m so used to more strict forms of programming, it’s painful to just drop those habits. I agree with you on the users as well.

Python, is not so great of a language. C is more respectable but very different.

Yeah people seem to think that Java compiles at toaster speeds. Don’t know why.

I used to program in c++, except I dropped it because it didn’t offer easy graphics. I wanted to make a game, you see. Things take FOREVER to write in it. >:( C++ is the same as C, except more “modern”. ???

I think the VERY big difference between C and C++ is, that C++ got classes?
I “never touched C” (but you can’t actually say that, because I programmed C++ without classes sometimes too…), but I think it’s much worse than C++, because you can structure code much better, if you’ve got Classes.

But I didn’t like C++ too much either… you can’t understand any of the Compiler errors you get, somtimes. It’s just… :& … Also, in java you get "ArrayIndexOutOfBoundsException"s, "NullPointerException"s, and if you’ve got no memory left, you get a “OutOfMemoryException”, wheras in C++ you get NULL… Also, in java null is an object, an instance of a class, wheras in C++ NULL is simply 0, and when you try to get something from a NULL-pointer which is supposed to be an object, you get a segmentation fault…

And lastly, BufferOverflow and Format String … (Exploits…)

Think about optimizing your algorithms before complaining about the limitations of the language.

Sometimes it wrongly indicates an error in another file (when you forget a “;” for example). It is over-complicated, I hate “const”, I waste tons of time in finding which keyword I have forgotten. Operator overload gives me headache. Tons of things are not explicit enough in C++ and in my humble opinion the “freedom” you get is not worth the time you may waste when something does not work as expected.

Did you even read what you quoted? If I had anything to complain about Java I wouldn’t be a member of this excellent forum, nor would I be wasting my time trying to write games in it.

Agree, intresting…


C++ does not have classes, not in the way Java does.

Yes, I haven’t even talked about how I hate the C++ classes… even if there are some things I like about them… some…

Yeah, I HATE error messages. They don’t make sense. :o

Lol I already saw some people here telling that JavaScript and HTML5 are wonderful…