Click to See Complete Forum and Search --> : when is c++ preferred over java?


bbcman
February 7th, 2003, 10:20 AM
Hi.
can u answer this.i want to know in which circumstances is java used and when is c++ used.
In other way when is c++ preferred over java and viceversa??
thanx
BBC

KevinHall
February 7th, 2003, 10:49 AM
The dividing line is not as clear cut as this, but here is a very brief summary:

Java: Good for web apps, OS-independent apps where performance is not of the essence.

C++: Good for apps where performance is of the essence or where you need low level platform hooks.

kuphryn
February 7th, 2003, 12:03 PM
Use C++ to solve real-world and complex problems that could require unparalled speed and efficiency. Use Java when you are lazy and want a quick and easy solution that Java library offers. Without the library, well, C++ owns you.

Kuphryn

Mick
February 7th, 2003, 07:42 PM
Originally posted by kuphryn
Use C++ to solve real-world and complex problems that could require unparalled speed and efficiency. Use Java when you are lazy and want a quick and easy solution that Java library offers. Without the library, well, C++ owns you.

Kuphryn

Heh...it's the reason why Java hiring pep's will give c++ pep's the job even if they don't know how to smoke java beans. But the opposite is rarely true. Learn C++, smoke java on the side ;)

Graham
February 8th, 2003, 06:08 AM
When is C++ preferred over Java? All the time, mate. All the time. :)

Mick
February 8th, 2003, 07:41 AM
Originally posted by Graham
When is C++ preferred over Java? All the time, mate. All the time. :)

That was my short answer. Except for the mate part ;)

Andreas Masur
February 8th, 2003, 10:37 AM
If the problem is faster, easier, cheaper etc. solved with C++ than with Java. And if the problem specifications does not include things like it should be web-based, run on several platforms etc.

There is no general when is one programming language preferred over another.

The basic guideline is that you should pick the language depending on the kind of project/problem you need to solve. And since this is changing all the time there is no general answer to this.

KevinHall
February 10th, 2003, 10:36 AM
bbcman,

I think Andreas's post and my earlier posts have the most honest answers. Not to offend the other posters here, but I would not really consider their posts unbiased (considering the question was posted in a C++ forum). I would expect the opposite set of answers if you posted in a Java forum. ;)

- Kevin

Paul McKenzie
February 10th, 2003, 10:57 AM
Originally posted by KevinHall
bbcman,

I think Andreas's post and my earlier posts have the most honest answers. Not to offend the other posters here, but I would not really consider their posts unbiased (considering the question was posted in a C++ forum). I would expect the opposite set of answers if you posted in a Java forum. ;)

- Kevin Can you imagine if you did have a "C++ is no good" opinion in a C++ forum or a "Java is a piece of garbage" post in the Java forum? :eek:

If that ever happens, you'll see why forum moderators are important. :)

Regards,

Paul McKenzie

Yves M
February 10th, 2003, 11:08 AM
Originally posted by Paul McKenzie
Can you imagine if you did have a "C++ is no good" opinion in a C++ forum or a "Java is a piece of garbage" post in the Java forum? :eek:

If that ever happens, you'll see why forum moderators are important. :)

Regards,

Paul McKenzie
Well, I'm not really here to 'convert' people to C++, so if someone posts a well argued post that in some circonstances java is better than C++, that's fine.

But yes, as you said, it's really pointless to say "C++ resp. Java is no good". If that's all that is in a post, I may use my superpowers to cast it into oblivion ;) And we know some people that tend to do just this :rolleyes:

Personally I agree with Andreas' approach. I mean, I even use VB regularly to test my COM objects. The sort of applications you write in each language are probably quite different, and each language is better suited for some things than for others.