java vs. C++

Started by
66 comments, last by antareus 19 years, 10 months ago
Java is nice, maybe tooooo structured, well its so structured it will give you a headache, c++ is older, its more manual, java does lots of things for you as it is very class based, as c++ doesn't have that much stuff built in,

for example its like opengl and direct3d, opengl and directx do the same thing, but opengl doesnt have everything done for you, you have to make it yourself where as direct3d contains alot of functions and methods, that help you out.

in the end java is slow and c++ is faster, java can make simple games, nice looking but simple,

where c++ can create nice looking and advanced


....I pretty good with Java as i am taught at college, but c++ i am playing with at home

edit:
whoever says java isnt slow, hasn't got the experience, tests and results they might do might say java is just as fast, but when you are using it , its so obvious,

[edited by - johnnyBravo on June 13, 2004 8:19:36 AM]
Advertisement
Being class based is an advantage. It doesnt allow you to make simple hacks like c++ will. And as for speed *sigh* you can still get ~90% of the speed of c++, you are probably referring to swing,which *is* slow

For indie game dev. to e only problem with Java is that you have to distribute the JRE with it, and when selling online, people with 56k wont like that.

For professionals, C++ is used because it can be used on any platform. That includes all the consoles. Java is currently limited to only PC development right now, but who cares? Who here has an XDK?
quote:Original post by johnnyBravo
whoever says java isnt slow, hasn''t got the experience, tests and results they might do might say java is just as fast, but when you are using it , its so obvious,


And you, of course, are speaking from vast experience:

quote:Original post by johnnyBravo
....I pretty good with Java as i am taught at college,


Can you tell me how much overhead is associated with a Java class? Which garbage collector does the Sun VM use by default? Under what circumstances will the compiler inline a function call? What is the purpose of soft/weak/phantom references and when should they be used?

I don''t want to get into a flame war over this, as it''s a waste of time and bandwidth. But really, take a look at the link I posted above and read it from top to bottom for a candid look at Java performance. And please don''t insult my intelligence.
quote:Original post by JasonC
Being class based is an advantage. It doesnt allow you to make simple hacks like c++ will.


Not really, not all problems are worth a class system to sort them out where as others map more naturally to classes, giving the programmer a choice as to which to use is better imo.

and ''simple hacks'' are often all thats needed to get a job done, just something quick and dirty to test something out... although in that case even C++ might not be the best choice, but even so its probably a good thing to still allow it (plus one mans ''hack'' is another mans solution)

quote:Original post by _the_phantom_
quote:Original post by JasonC
Being class based is an advantage. It doesnt allow you to make simple hacks like c++ will.


Not really, not all problems are worth a class system to sort them out where as others map more naturally to classes, giving the programmer a choice as to which to use is better imo.

A good programmer knows how to choose the proper tool. To claim that Java is bad because it's class-based is like saying that water sucks becuse it's wet. Java is OOP only and class based. Use it in areas where that attribute is an advantage and user other languages in other areas. Judge Java for what it tries to be, not for what you would like it to be.


There's no place like 127.0.0.1


[edited by - rohde on June 13, 2004 9:15:42 AM]

[edited by - rohde on June 13, 2004 9:16:12 AM]
"We confess our little faults to persuade people that we have no large ones." -Francois de La Rochefoucauld (1613 - 1680). | My blog
I think Java''s qualities as a language are rather irrelevant here.


JIT has not evolved to the dream it''s supposed to be yet, but with the .NET stuff as well as Java being pushed extremely hard, I imagine JIT technology will mature soon enough. By 1.6 or even maybe 1.5, Java will be quite ready for games.
SlimDX | Ventspace Blog | Twitter | Diverse teams make better games. I am currently hiring capable C++ engine developers in Baltimore, MD.
quote:Original post by rohde
A good programmer knows how to choose the proper tool. To claim that Java is bad because it''s class-based is like saying that water sucks becuse it''s wet. Java is OOP only and class based. Use it in areas where that attribute is an advantage and user other languages in other areas. Judge Java for what it tries to be, not for what you would like it to be.


I never said ''java is bad because it enforces class'', I just dont see how its an ''advantage'' to force people into classes, t''is all

quote:
There''s a big advantage to runtime compilation in the fact that the compiler has information available that a static compiler does not.


Not quite. The runtime compiler can''t perform most of the optimizations that a static compiler can because it would be far, far too slow to do at runtime. Not only that, but, again, most programmers figure out where the bottlenecks are LONG before the application is even shipped. It solves a problem that doesn''t exist (unknown bottlenecks cropping up at runtime).

I think the "compile-on-install" methodology of .net is probably the most promising, currently. With that, we can easily have compilation quality equal to static compilers, but with the same advantages of not having to worry about platform dependence.

Of course, we still lose out on platform-dependent optimizations that the compiler just can''t possibly be smart enough to make (it''s not psychic). That shouldn''t be a big deal most of the time.

I''m just goign to reiterate this one final time for the Java vs. C++ speed debate: Try. It. Yourself. Don''t look at (almost completely biased) "benchmarks" that test one or two things. Compare apples to apples, or keep your opinions to yourself, because until you''ve seen REAL results, it''s a meaningless opinion.

---------------------------Hello, and Welcome to some arbitrary temporal location in the space-time continuum.

quote:Original post by Aldacron
quote:Original post by johnnyBravo
whoever says java isnt slow, hasn''t got the experience, tests and results they might do might say java is just as fast, but when you are using it , its so obvious,


And you, of course, are speaking from vast experience:

quote:Original post by johnnyBravo
....I pretty good with Java as i am taught at college,


Can you tell me how much overhead is associated with a Java class? Which garbage collector does the Sun VM use by default? Under what circumstances will the compiler inline a function call? What is the purpose of soft/weak/phantom references and when should they be used?

I don''t want to get into a flame war over this, as it''s a waste of time and bandwidth. But really, take a look at the link I posted above and read it from top to bottom for a candid look at Java performance. And please don''t insult my intelligence.


ill have a look....
, from using it , or programs programed in it, especially borland jbuilderX, its slow, but not terrible, its still a good language.

But come on you can''t say java can compete with c++ in the field of making ''proper'' games


quote:Original post by Promit
By 1.6 or even maybe 1.5, Java will be quite ready for games.

Its already more than suitable for games, its just not quite ready for making Doom4 yet.

This topic is closed to new replies.

Advertisement