Quote:Original post by Anonymous Poster
Also note that none of these languages try to restrict what the programmer can do, you can still link assembly code together with your C or C++ code.
Which limits the code to a specific hardware architecture.
Quote:
Java is much slower than all these languages (dont bother arguing about this until you can provide fair, non-trivial benchmarks)
How can you be so sure? Have you read an article from 1997 stating Java is "much slower then C++"? Have you conducted your own tests? Do you even know about JIT?
I used to be against Java for game programming because of garbage collection. I though it might introduce inpredictable long pauses. Then some day I conducted tests and it turned out the pauses were less then a millisecond long. So even if the pauses were 10 times as long there would still be no way to notice them.
Most people think Java is slow because it USED TO and there's a lot of outdated performance comparisons on the web. It seems to be very hard to get these prejudices out of people's heads.
Quote:
and it is in ways less abstract than C++. C++ allows you to create new types that you can work with in exactly the same way as the built-in types, while java forces the programmer to work with "Objects" and "primitives".
That's because objects are always treated as references. It's a design philosophy. And operator overloading is evil.
Quote:
You cant pass primitives by reference, need to wrap them here too.
You rarely need this if you are a good java programmer. Why would you want to tell a method that it should tweak values which do not belong to the corresponding object? It's bad OO design.
Quote:
All objects in Java have atleast 12 byte or something as overhead
Which is a good thing because you have runtime type information. Java's reflection API is amazingly powerful.
Quote:
A 1 million Array of 32 bit integers will have an overhead of 12mb
A 32 bit integer is not an object :)
The overhead for the entire array is only 12 (or whatever) bytes.
Quote:
If you want to use Java for your stuff, go ahead, but this thread started as one of those "C++ will die" threads that Im quite sick of.
I'd be glad to see C++ die, because these types of threads in the beginners forum would cease to exist:
- what do I put in the header file, what in the .cpp file?
- my program crashes and I have no idea why (buffer overflows)
- A needs a pointer to B and B needs a pointer to A (but the poster has never heard of foreward declaration)
- all sort of stuff related to memory leaks (destructor needs to be virtual etc.)