Author Topic: Java Vs. C++: A Beginner's Perspective  (Read 4481 times)

Offline Confor_MIDI

  • Single posting newcomer
  • *
  • Posts: 2
Java Vs. C++: A Beginner's Perspective
« on: September 28, 2010, 01:41:30 am »
I'm sorry to disappoint any of you long-time programmers out there, but I just got off of a long conversation with one of my programmer friends and he is claiming that Java is the future and that C++ is getting very outdated.  I wasn't too sure whether or not to take his word because I had heard otherwise from another long-time programmer friend.  Basically, the points my (1st) friend made against and for Java were the following:
Pros

  • Lightweight/small file size
  • Cross-platform/Linux, PC, Mac
  • Partially compiled/faster to process in comparison to interpreted languages

Cons

  • Not built-in/internal on Linux, Mac, or PC/slower processing speed
  • Less user-created libraries available/less documentation
  • Requires Java to run/forces user to download Java
  • Still slower because it's not completely compiled

On the phone, however, my friend assured me that the Linux kernel natively supports Java and that it is no longer required as a supplementary download.  He also said that from some of his own programs he wrote in C++ and Java, the one in Java outperformed the one in C++ by a long shot on his Mac (which doesn't internally support Java).

Googling this to find out didn't seem to answer any questions.  Can someone confirm or deny the myth so that I can make my decision on whether to learn C++ before Java?  Thanks.

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5915
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: Java Vs. C++: A Beginner's Perspective
« Reply #1 on: September 28, 2010, 01:58:51 am »
you should discuss this kind of point view in another place, not the Codeblocks' forum.
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.