I think it's really strange that people would just outrightly make a thread just to attack me and my sig.

What's up with people hating Java?Java is one of the best languages I've used.Given that I don't have anywhere near as much experience with Java as I have with C++, Java has made my life easier and my programs run quite fast on my PC.

There's fanboy hatred for Java, there's fanboy love for it. Don't go thinking that a conflict such as C++ vs Java is anything new - all the way through the history of computing people have been arguing about languages, hardware, styles of programming, laying out of braces. Hell, in the early days a byte wasn't necessarily 8 bits...

Way back at the dawn of modern computing (Bletchley Park) some very intelligent people were building the first computing machine, with the knowledge that the course of the war depended on them making it work. However, I'm sure at some point one scientist wandered over to another, looked over his shoulder and said "Sodium lamps? Sodium lamps suck!"

If you really wish to get this guy annoyed, point out that he as a mere user of C++ doesn't know enough about its internal workings to take full advantage of it, so a 5% difference will likely be entirely negated by his sloppy code. Also, not being a professionally-trained test engineer, his so called "benchmarks" are guaranteed to be inaccurate and wildly misleading. Also, while "kthxbi" is a good final comment, "kthxdie" tends to rile people even more.

I thought of a clever reply, but then realised it's much simpler than that. Your response should be:

1. No, you're wrong. This might sound like a pathetic response, but it's the simple truth - you are simply wrong and looking more stupid every time you repeat your fallacies.

2. You need to first prove that you are sufficiently qualified to judge the performance of these two languages. So does the person who's benchmark you didn't like (and let's assume he/she wasn't, and we'll all ignore their "benchmark" entirely because the chances are it's BS too).

3. Part of that qualification requires that you understand both languages through the whole of the runtime cycle. It's a funny co-incidence that every time a C++ programmer says things like this, when you ask them about how java runs it turns out they don't have the faintest idea - but believe they do because they have a vague idea how it used to run 10 years ago. It's never occurred to them that things change in the IT industry, and that perhaps they should get off their butt and do some research into how things change. As Lou Gerstner (Chairman of IBM) was fond of saying - in this industry, if you don't keep refreshing your knowledge every few months, you're useless to us as an employee. (...and even more useless to yourself - your knowledge can be more damaging than the blind ignorance of someone who knows what they don't know instead of assuming they know what they are talking about)

4. There are some bugs (they even have bug numbers in Sun's database) in the current JVM from Sun that cause specific operations to run unexpectedly slowly. In some cases there are good reasons for this (the compiler refuses to risk accepting a CPU's potentially "broken" IEEE floating point, IIRC?), in others it's simply that Sun's staff haven't finished adding the optimizations that have become available for new CPU's (like some of the vector functions).

5. If you go off and learn a LOT about how code executes at runtime, you'll see that java should, in practice, demonstrate performance so close to C++ as to be statistically insignificant (e.g. it is too low to stand above the differences caused by one machine having a 3-month out-of-date library and other common minor effects on performance). You will also see that in theory, C++ can never be as fast as Java.

6. When you make a statement that 100% optimized java is slower than 100% optimized C++ you demonstrate you truly are a moron or else have no idea what you are talking about. A 100% optimized JVM can never ever be equalled by a C++ compiler...it's just that no-one has (yet) spent sufficient time and money to produce a JVM that is quite that optimized (...unless e.g. IBM's mainframe JVM's already have? Or some other HPC that I've not been lucky enough to use )

I have nothing to prove to you. Your opinions of me are meaningless. If you want results, get them yourself.

Quote

Eh? I care? Really? Responding to your posts means I care? I never knew that. Thanks for educating me on all these matters.

What's Java and C++? What's C#?No really? I care about what you think. You are right. I love you more than I love my family. Thanks for telling me what to think and what I know and don't know.I really can't live my life without you.

Don't worry, I can't get results without you.

And now, i ask you: who has no respect? who doesn't listen? who has no arguments? who is impolite here?!?

Aye. The wisest thing of all to do is to stay quiet when someone trolls or flames you, which leaves a convenient record of how much of a nob they are hanging in limbo for all to see but of course doesn't incriminate oneself

Not sure how much importance I would place on a thread in a forum where the community commonly puts their machine specs in their sigs. To me thats juvenile right from the start. Plus the guy has a .ru in one of his links. Thats a different culture there. Although the language is english the intent and meaning can be quiet different than you may suppose.

I've been spouting off in it, and getting some really off the wall comments. Come join in!

Gah!! I can't bear it. Tried reading it, but the stupidity level is just too excessively high I feel my own IQ slipping as I went further through the posts.Got as far as the guy who was saying something about JIT being just another level of interpreted language (based on that logic C must be just another level of interpreted language as well), and another who claimed the impossibility of a JIT reaching the speed of C/C++... before I gave up.

I wrote a basic (DOS-based) 2D engine in C back in (around about) '92. Absolute bloody nightmare. The only good thing about it was using Borland C. Anyway, to cut a long story short (and having developed a bit in C/C++/Oracle Forms/Powerbuilder/VB/etc in the subsequent years), when I tried Java in '96, I couldn't wait to never look at another programming language again. The same 2D engine would've taken me a fraction of the time it had in C (especially considering I spent about 99% of my time trying to track down frigging memory/pointer problems). Haven't touched C in anger since, nor have I wanted to (although I've become a bit of a Python fan, as well as Java, lately).

I somehow think the rabid C/C++ guys have an added 'perversity' chromosome....

(with apologies to the Java guys on this board who also develop in C/C++ )

especially considering I spent about 99% of my time trying to track down frigging memory/pointer problems

There's a standard response to this from C/C++ developers. Namely: "If you have pointer problems it means you are a LAm3R because you haven't spent 3 months developing an Ub3r-3lit3 pointer-management system that would completely prevent any more pointer errors ever." Or something along those lines.

Oh, and using a language with bounds checking means you are gay, obviously. And probably drive a Clio.

"I have never done unit testing and I don’t find it a very useful concept" - Jonathan Blow

I often don't even get as far as the bugs... often I'm just totally thwarted by outrageously opaque compiler errors, usually when any proprietry wierdness from Microsoft is involved like COM and GUIDs.

If you use C++ templates the errors out of the compiler are extremely cryptic. In fact I found a Perl script on the net that would actually convert VC++ error messages into something meaningful. Of course then you have to go through the trouble of installing Perl on your Windows box...

One reason C++ is more popular for games is probably largely due to most games programmers use C++ all the time, so its cheaper to use it than train staff in another language (and all its foibles).

Having used Java for nearly a year now to write games, I still prefer C++ for 4 reasons:

1) Pointers (& most especially pointers to pointers - yum!), I just love em, & no I don't use any poxy pointer management - I just get them right 2) Being able to cast pointer types - hence read ints as floats, cast void pointers to derived object types, etc.3) Inline assembler4) It runs on the target machine without requiring extra installs (& Microsoft JVM 1.1 sucks)

These are my own opinions, but feel free to argue against them as though they were facts

- Dom

PS: Note that execution speed is not one of my reasons. When your having to target min. spec. machines of PII 400 and a shonky video card, 90% of players will have better so will be running full frame rate in either Java or C++.

But quite frankly after havng programmed in C/C++ for many years(and still now) I find nothing 'yummy' about C pointers. There are a few rare occasions where you can do something reasonable clever with them. But I don't miss them at all.

Inline assembler? I doubt this is needed for any game project. I have used it in only a few very specific cases of DSP code where coding directly with MMX/SSE2 was the "right" way to do things with reasonable efficiency. E.g. low pass filter & image scaling routine for realtime video encoder and a realtime audio sample rate converter. OF course if you were doing a codec (JPEG, MPEG, whatever) then coding directly with vector instructions is the only option for reasonable performance... I wish I could convince the Java guys that they NEED to do this for their JPEG code in the JRE.

Only way we can convince people of othervise, is to make great games and great programs. Sitting around and talking each others ears off in a JAVA forum sponsored by SUN. Will never convince anyone.

That's a laudable aim, but it is NEVER going to work on it's own. Education - especially in the face of large vested interests and FUD - is all about a multi-pronged attack (preferably co-ordinated to maximum effect).

Hence, the GTG are (from what little they tell us): - trying to get Sony to support a JVM on playstation - trying to persuade large client-middleware companies (like Gamespy etc) to get more involved (I would imagine they're hoping ultimately to get them to properly support and provide java-versions of their libs) - running a competition to find good java games

Unfortunately, they fail in several ways too. For instance: - Jeff has now been tantalising us (for more than a year, no?) with a document that has actual facts and figures on how much dev time can be saved using java on a games project. It is sheer insanity that he "never has the time to photocopy this or put it up on a website" (paraphrase) and, IMHO, whoever is letting that be so low on his priorities deserves a slapping for sheer idiocy - they sporadically (definitely not always) try to work against games developers and middleware providers instead of with them, citing their need to "make money". Despite ignoring several obvious ways they could work with developers AND make money. OK, so I guess that really they're being cunning and trying to get more in tune with the games industry by adoptiong NIH as their mantra , so that they can speak the same language as games-industry execs - Whoever the heck is in charge of press relations needs to be replaced. The majority of the press still have no idea the GTG even exists, and I'm still seeing press stories in major (6-digit readership) games and IT industry mags on java games issues where the GTG hasn't even been consulted. This is a year after they were founded!

Quote

Look these kinds of discussions are endless and fruitless.

Maybe for you. There are a lot of smart people in the mainstream games industry, and I've convinced more than a few that java is viable simply by explaining why it's as fast or faster than C++. These people are not stupid (at least, not all of them ) they're just ignorant; many have written GC's and similar themselves, more than once - just telling them which algorithms JVM's use these days for certain operations is enough to get them to sit up and say "Ah, well in *that* case, this is actually sounding worth using...".

Quote

I hear that constantly even at a instititute of "higher learning"

Then go find a better institute although I sympathise; many academics have their heads rammed so far up their backsides it's hard for them to hear anything in the outside world, and they are often IME years if not decades behind the state of the art . That's not necessarily a bad thing - if all you want them for is specialisation, great, but at *teaching* institutes its a frequent and major problem, since they often teach undergrads to be misinformed idiots .

java-gaming.org is not responsible for the content posted by its members, including references to external websites,
and other references that may or may not have a relation with our primarily
gaming and game production oriented community.
inquiries and complaints can be sent via email to the info‑account of the
company managing the website of java‑gaming.org