Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

What is best to learn for portability?

Status
Not open for further replies.

RealM

Technical User
Oct 2, 2002
6
US
I'm looking into making applications in c/c++ or possibly another language. Since syntax in c and c++ is a little different I was wondering what language would be best to learn in. I currently know php/perl. So I'm open to suggestions on what language to learn.

I will be wanting to be able to port these applications to windows as well.
 
This reply is based only on portability:


C and C++ are portable in that they have a standard library that should be portable to all platforms. Of course, all libraries have subtle differences, and even C/C++ implementations are different.

Those libraries have no GUI support at all. Anything that needs a GUI is going to have to be rewritten when you port to another platform unless you use a portable graphics library.


Java also has a standard library that should work on all platforms.

It has a virtual machine that should (and does) work pretty much the same on any platform it has been implemented for. This means you can compile your code once and have the resulting bytecode run on any platform.

The standard Java libraries do include GUI support. You can write Java code on Linux and have the same code (from the same compilation) run on Windows, Macintosh, AIX, etc.


Java is therefore quite a bit more portable than C/C++.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top