Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

dmf_king

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

This topic is 5411 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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.

Share this post


Link to post
Share on other sites
Advertisement
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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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. :/

Share this post


Link to post
Share on other sites
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*

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
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

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!