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.
"JavaRanch, where the deer and the Certified play" - David O'Meara
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... "
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....
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...
posted 17 years ago
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
posted 17 years ago
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