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,

1 2

ifa = 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.

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).3. Some people just prefer dynamic languages

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 <insert computer language here>."

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.

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.

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.

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.

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...

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.

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

But I didn't like C++ too much either... you can't understand any of the Compiler errors you get, somtimes.

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.

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.

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

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.

But I didn't like C++ too much either... you can't understand any of the Compiler errors you get, somtimes.

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.

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.

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

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.

But I didn't like C++ too much either... you can't understand any of the Compiler errors you get, somtimes.

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.

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.

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

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.

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

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...

In C and C++, you can get a segmentation fault by attempting to create an array with a negative size or by attempting to go over the bounds of an existing array.

There's a bigger chance you'll be writing your "enterprise" code in javascript than in java within 5 years. With the advent of technologies like NodeJS, json, HTML5, REST, and even database systems like MongoDb then the use of Javascript is obvious.

I dread opening up my Java project at work, it's so heavy, it's so difficult, it's so nightmarish, legacy, difficult to debug, difficult everything. I scream in my head. The project is a multi module maven project, which I cannot even open in Eclipse, I'm forced to use IntelliJ, which is dead slow and I can't use in a productive manner. It reminds me of a huge enterprise legacy project that I used to work on in IBM's WebSphere, where all the code was intermingled in some JSP and servlet classes. Honestly, I can't be arsed with a museum codebase like that.

And remember, Java vs. Javascript vs. C vs. C++... it's not about the technology and how good it is from a computer engineering perspective. These languages only exist to deliver results, to make a good product efficiently.

Although Java may seem like a good language, it's not very efficient to make stuff in it. I can do much more in Javascript in shorter time.

And let's not forget, client PC's are getting very powerful, the browsers themselves are pretty good powerful virtual machines with good rendering capabilities. Obviously the language of choice in those VM's is javascript. And for the sake of simplicity, programmers would write both their backend and frontend in javascript.

And already, javascript is the most used programming language in the world.

Well, I can see that occurring since everything is moving straight to web now. With the advent of smartphones and tablets, laptops and desktops are becoming more obsolete. The technology that is the best for working on these devices, JavaScript.

If only Java didn't have to hulk around the JVM on its back, it probably would have been accepted into a lot more companies. The Java Applet was actually years ahead of its time, but just didn't get the right support. Reminds me a lot of why the Sega Dreamcast failed dooming that company.

I hope that the various efforts done here to try and keep Java relevant would spark interest. I definitely would not like to see Java become legacy. The idea behind Java is a little too good for that.

java-gaming.org is not responsible for the content posted by its members, including references to external websites,
and other references that may or may not have a relation with our primarily
gaming and game production oriented community.
inquiries and complaints can be sent via email to the info‑account of the
company managing the website of java‑gaming.org