• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Knute Snortum
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Ron McLeod
  • Piet Souris
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

Java Is Better Than C++. Why Is C++ Still Popular?

 
Ranch Hand
Posts: 1309
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Java is better than C++. Why is C++ still popular?
 
Ranch Hand
Posts: 3244
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving this to Java News - it is more appropriate there than here - I think.
On second thought, it isn't really news so I'll just leave it here....
[ January 25, 2002: Message edited by: Dave Vick ]
 
"The Hood"
Posts: 8521
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In order to keep java Platform independant - which is it's MAJOR strength, it is necessary to remove yourself from the nitty gritty of the operating system.
Of course there are times when it just IS necessary to get down to that operating system level, and then C++ is often the tool of choice to do that.
Plus, one can not forget that there are millions of years of legacy code in C++ that need to be maintained. That code is going to be around for a LONG time to come.
 
Ranch Hand
Posts: 732
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you can open hell's pit with this post (luckily we dont have that many c++ prgrammers around here!)
as a personal view i think c++ is MUCH better than java.
java is easier to learn and more comfortable to work with BUT
everything u can do with java u can do in c++ but you can do A LOT of things in c++ that u cant in java.
remember that every operating system out there is writen in c and c++ and that every game for the pc is done in c++ too.
java just isnt good enough for them.
as for the many posts that im sure will follow this one, save your breath guys, you can argue that way or another and u can so no language can be defined BETTER.
agreed fellews, just wanted to post a counter view to the headline: "if java is better... "
 
Ranch Hand
Posts: 252
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes I agree with Roy (being a C++ programmer basically) And when it comes to building time critical systems C++ code runs much faster than Java code (even in compiled form)
 
Bartender
Posts: 2205
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's all relative Bhushan.
Somewhere there's an old assembly language programmer scoffing at your fancy-shmancy 3rd generation language.
If you want REAL speed my boy, write to the metal.
<cue voice of dead grandfather>
Poppycock I say! In my day, if a man wanted to compute the tragectory of an artillery shell he painstakingly twiddled row after endless row of mechanical switches and finally after 6 days of finger-breaking labor, he pushed a button and the answer gloriously appeared after several minutes on a little slip of paper....ah, THOSE were computers my lad....
 
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Unfortunately, yes, the dispute I get when people build large applications is that overall C++ runs faster.. however, there are companies out there, (I won't mention names, who do contract work for large telecom companies or banks, etc in which decide to use Java because it is a niche now.. whereas C++ would have been the best thing.. but, they like to have the publicity that their company has implemented large enterprise applications in Java so that they can subcontract their employees better for future projects... in which case is the wrong thing to do.. I guess people love to jump on 'the in-thing' even when it's not the best thing and I see this over and over in large projects...
 
Rob Ross
Bartender
Posts: 2205
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I was only half kidding in my previous post.
But the truth is, the criticisms of Java for it's perceived "slowness" compared to C++ is exactly the kind of criticism C++ used to get compared to C, and before that, C to assembly.
The truth is, for the majority of the applications being written in Java and C++, the speed of java is not a bottleneck. And even in those instances where one feels that C++ would be "faster", I ask if it's worth the trade off : faster execution at the expense of more bugs, especially pointer and memory related, and productivity, in terms of java's core API's, extensions, and vast array of enterprise tools.
I think if you want to write the next Quake, you may have a good argument against using Java. But anything less demanding than that, I would say that the total benifits of java far outweigh any particular increase in execution speed. I'm willing to trade a few CPU cycles for the advantages java gives me.
Rob
[ January 26, 2002: Message edited by: Rob Ross ]
 
Roy Ben Ami
Ranch Hand
Posts: 732
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
its not all speed diffrence though.
excluding the speed debate, in c++ u can do things u cant do in java period.
also Rob, i LOVE the artillery story
how true
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!