Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Platform independent languages [closed]

I was searching a bit for another platform independent language like Java.
Are there other P.I. languages?

Thanks

like image 530
Martijn Courteaux Avatar asked Apr 09 '10 12:04

Martijn Courteaux


2 Answers

Platform independent isn't a perfectly well defined term. It can mean different things to different people. For example, some people have said that C is PI, others would say it isn't. Sometimes, people go to a lot of trouble to make C code work with configure(1) so that it can compile on lots of different platforms. Does that mean that one can write platform-independent-C, but not all C is platform independent?

Perhaps Java (+other software that runs on JVM) is considered PI because they define a platform, and it's up to different machines to implement that platform. But they don't always do it properly - for example, some JVMs (particularly early ones) have bugs that others (on other platforms) don't. And of course you can write non-pure java that links to native code - certainly not platform independent.

Several answers have suggested that scripting languages are platform independent. Tell that to people who write javascript and want it to work on IE6, IE7, FF, Chrome, Safari, etc!

So it's really up to you to say more about what you mean by "Platform Independent", or why you're asking.

like image 62
John Avatar answered Oct 13 '22 00:10

John


Depends on what you mean with platform independent:

  • compileable on any platform with the same sourcecode: Almost any language
  • Copy on a different platform and run immedatly: Any Scripting Language and Java and .NET for platforms which have the framework (JRE and .NET/mono).
like image 42
Morfildur Avatar answered Oct 13 '22 00:10

Morfildur