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 hellrld program in C++:
Compared to:Code:#include <iostream> int main() { std::cout << "Hello, world!"; return 0; }
Why does the Java one have to be so ridiculously long?Code:class HelloWorld { public static void main ( String[] args ) { System.out.println("Hello, world!" ); return 0; } }
Or take user input for example.
C++:
Java:Code:#include <iostream> int main() { cout << "Enter your name: "; cin >> name; cout << "Your name is " << name << "."; return 0; }
Of course, the Java one includes an error check too, but seriously - why is it so ridiculously long?Code: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 ); } }
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)
Results 1 to 8 of 8
Thread: So, my official opinion on Java
- 19 Sep. 2012 02:11am #1
- Join Date
- Apr. 2010
- Location
- When freedom is outlawed only outlaws will be free
- Posts
- 5,113
- Reputation
- 195
- LCash
- 3302.00
So, my official opinion on Java
- 19 Sep. 2012 02:50am #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.
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.Last edited by The Unintelligible; 19 Sep. 2012 at 03:05am.
- 20 Sep. 2012 09:22pm #3
The funny thing is you can say the same about C++...
// PHP
echo 'Hellrld!';
// JavaScript
document.write("Hellrld!");
- 20 Sep. 2012 09:31pm #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).
- 20 Sep. 2012 10:17pm #5
- Join Date
- Apr. 2010
- Location
- When freedom is outlawed only outlaws will be free
- Posts
- 5,113
- Reputation
- 195
- LCash
- 379.00
- 20 Sep. 2012 10:50pm #6
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.
- 21 Sep. 2012 04:15am #7
Python is definitely probably the future maybe.
- 21 Sep. 2012 04:35am #8