Java, C++... can't we all just get along!?

Started by
26 comments, last by dmf_king 20 years, 2 months ago
Hi, just wondering what the real differences are between java and C++ - in some ways I think Java is better because it is cross-platform well... in the sense that .jars can be opened on any platform. Anyway, are there any significant limitations with java - I''m going to stick with c++ but I''m just curious.
Advertisement
cocoa on mac gcc on linux mingW or VC++ on windows C++ isnt cross platform eh? (c++ is faster to)(yet asm is faster than cpp)

[Mercury Software] [Google!] [ Look I DONT Follow Trends ]
Java and C++ are both good in their own domain.

The problem is that most people have serious problems determining the bounds of those domains.


Java has major strengths:
1) Complete ideal cross-platformed in the sense that code doesn''t even need to be recompiled in order to run on different OSes and architectures (unless the coder pulled some endian dependent BS).
2) Applets. You can''t find anything quite like em.

C++ has a couple strengths of its own:
1) Fast. Especially when written properly and without too many frills.
2) Far more powerful in terms of memory management, polymorphism, templates, etc. Of course you pay for that in complexity of code.
3) Native. Sometimes native just works better, for whatever reason. This is related to speed as well.
SlimDX | Ventspace Blog | Twitter | Diverse teams make better games. I am currently hiring capable C++ engine developers in Baltimore, MD.
Well programming languages are just a tool, so the best would be to be able to use as many as possible. Each programming language has its fields in which its top. Deciding which to use depends on your project, so ideally you decide which language based on the project.
-CProgrammer
I use Java because my Java code tends to actually work the nth time I write/edit it, for much smaller values of n than when I work in C++. And I learned C first, then C++, then Java. :/
quote:Original post by DerAnged
cocoa on mac gcc on linux mingW or VC++ on windows C++ isnt cross platform eh? (c++ is faster to)(yet asm is faster than cpp)


if you now demonstrate how you compile ONE executable on any of those platforms that will run on every other platform.. then i believe you understood what people talk about when they say cross platform in combination with java (especially since he even explained it, just to be sure nobody is thinking about the strict meaning of it).

and i wont go into details about how much of a pain in the .. it is to actually write something that will compile on each platform (especially if you dont happen to have all of them for testing).

omg, im defending java and i dont even like it *lol*

f@dzhttp://festini.device-zero.de
Threads like this should be closed.

These arguements are pointless.

A programming language is a tool. If the tools is right for the job then SHUT UP.
-jonnii=========jon@voodooextreme.comwww.voodooextreme.com
Yes. For me, C++ is the tool to use when I need to write something heavy on the processing/memory (like, say, a game). I''m also simply more familiar with C++.

Java is what I use when I need to write something and I need it done YESTERDAY. I find it easier (read: faster) to get working code with Java than with C++. No pointers to mess with, no playing with memory allocation, etc.

It all depends on what you need it to do, as has been stated previously in this thread.
Technically win32 executables can be run at close to native speeds and some times faster on most *nix variants (a la wine and wineX).
quote:Original post by Promit
C++
Far more powerful in terms of [...] polymorphism

Since you mentioned templates separately, how exactly does C++ have far more powerful polymorphism (counting out templates)? Java and C++ have the same kinds of polymorphism, i.e. inheritance based dynamic polymorphism and static polymorphism of functions with different parameters.

If you meant templates, then let me tell you Java has far easier memory management, dynamic garbage collection, elegant dead reference detection system, memory leak prevention mechanism and more

This topic is closed to new replies.

Advertisement