A preserved archive of the Logical Gamers community forums, 2009-2025. The original threads and posts, served read-only. Registration, posting and private messages are gone for good.

So, my official opinion on Java

932 views · started by 323 ·
#1
So, my official opinion on Java
After two weeks in my Comp Sci class that for whatever reason uses Java, I've come to a conclusion.

Java feels fairly easy to pick up, but is retarded as a programming language. For example, it's insanely long strings to to simple things are easy to memorize, but retarded to type.

A hello world program in C++:

#include <iostream>
int main() {
std::cout << "Hello, world!";
return 0;
}


Compared to:

class HelloWorld
{
public static void main ( String[] args )
{
System.out.println("Hello, world!" );
return 0;
}
}


Why does the Java one have to be so ridiculously long?

Or take user input for example.

C++:

#include <iostream>
int main() {
cout << "Enter your name: ";
cin >> name;
cout << "Your name is " << name << ".";
return 0;
}


Java:

import java.io.*;

public class GetUserInput {
public static void main ( String[] args ) {
System.out.print("Enter your name: " );
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String name = null;
try {
name = br.readLine();
} catch (IOException e) {
System.out.println("Error!" );
System.exit(1);
}
System.out.println("Your name is " + name );
}
}


Of course, the Java one includes an error check too, but seriously - why is it so ridiculously long?

Also, for games and large programs and stuff, Java is slower because of how high-level it is and the fact that it's run in a virtual machine.

Overall, I prefer C++ because of it's extreme variety of things you can program with it (For example, Xbox games) compared to Java, where the only good game ever programmed in it takes a gaming computer to run, when it has 10-bit graphics. (Read: Minecraft)
#2
First and foremost I'd like to say that your entire claim on behalf of Java sucking is flawed. Of course all programming languages aren't going to be similar. Some are concise, some are verbose, and some are just plain esoteric. Java just so happens to be structured that way. That's just natural differentiation between programming languages. So while your opinion does seem a bit prejudice, everyone has their personal preferences and opinions. So, it's fine and all that you don't like Java. But it's more or less one-sided to say the entire language is "retarded" just because of this.

Also, for games and large programs and stuff, Java is slower because of how high-level it is and the fact that it's run in a virtual machine.

Overall, I prefer C++ because of it's extreme variety of things you can program with it (For example, Xbox games) compared to Java, where the only good game ever programmed in it takes a gaming computer to run, when it has 10-bit graphics. (Read: Minecraft)


And yes, Java is slower by nature - it's interpreted, of course it is. As such, speed shortcomings are obviously going to be a natural consequence. That's generally where lower-level languages come into play. So this case is not exclusive to Java.

High-level also does not have anything to do with speed. Interpreted and compiled do. Delphi, for instance, is according to benchmarks one of the fastest programming languages to date. And guess what? It's high-level. But guess what else? It's also compiled (to native machine code to be precise) as opposed to being interpreted. It's made in ASM so this can probably be attributed to that fact.

C is another example. While having both high-level and low-level elements, it by nature is a high-level programming language (ostensibly called mid-level).

It's common knowledge that in high-level languages execution speed is usually a trade off for human readability, which in turn leads to faster development. Vice-versa for low-level languages - speed in terms of execution at the cost of human readability. Though, in those seldom cases, sometimes the language in question has the best of both worlds so to speak.

Furthermore, C++ has nothing to do with the Xbox console. You're referring to C# (not C++) coupled with the XNA framework, which is pretty similar to Java in terms of linguistics and structure. And incidentally, is also similarly a high-level programming language.
#3
The funny thing is you can say the same about C++...

// PHP
echo 'Hello world!';

// JavaScript
document.write("Hello world!");
#4
The funny thing to me is that he's going to be shot down by C++ if he ever gets far enough.

OP just go with C#. You'll probably like that (it's also the language used behind Microsoft Xbox game development).
#5
The funny thing to me is that he's going to be shot down by C++ if he ever gets far enough.

OP just go with C#. You'll probably like that (it's also the language used behind Microsoft Xbox game development).


No, C++ is what Xbox games run on o-o I've heard C# is one of the worst languages ever. And anyway, I'm not into game design, so fuck that shit lol.

And what do you mean "Shot down"?
#6
No, C++ is what Xbox games run on o-o I've heard C# is one of the worst languages ever. And anyway, I'm not into game design, so fuck that shit lol.

And what do you mean "Shot down"?


Wrong and wrong. The Xbox is Microsoft's proprietary console. Accordingly, they use their own proprietary language - that being C#/XNA. I have no idea where you've heard this from.

C# is also a decent language if you use Windows and don't mind the .NET runtime. Try using it before you judge it. You'd probably actually enjoy it for Windows development.

And I mean you would be shot down. C++ is insanely difficult and confusing as a whole. Especially if you're newer to programming. Like I said, you'd be better off with Java (but that seems to be out of the question) or Python. If not that then try your hand at C (less confusing and inconsistent than C++) or another language.
#7
Python is definitely probably the future maybe.
#8
GAMEchief wrote:
Python is definitely probably the future maybe.


Gosh. So many clauses. Make up your mind man!