Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 6 years ago.
I was searching a bit for another platform independent language like Java.
Are there other P.I. languages?
Thanks
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 6 years ago.
I was searching a bit for another platform independent language like Java.
Are there other P.I. languages?
Thanks
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.
Depends on what you mean with platform independent:
It might be easier to list platform-dependent languages.
Perl, php, scheme, lisp, LOLCODE. Most interpreted languages really.
Ruby, Lisp, Scheme, Scala, Clojure, Python, Perl, PHP, C# (via Mono)...
Honestly, the list could keep growing. It's much easier to narrow down your definition of platform independent or ask which languages ARE platform dependent.
Java is platform independent because it runs on the Java Virtual Machine (jvm). There are other languages that run on jvm, all of them are of course also PI. Scala is an example.
There are a lot of p.i. languages. What do you want to achieve? Just want to learn another language? Or do you have a specific project in mind?
Some examples:
C/C++, C#, Java, Ruby, Python, Perl, PHP, Scheme, Lisp
Some useful links:
http://en.wikipedia.org/wiki/Lists_of_programming_languages
http://en.wikipedia.org/wiki/Comparison_of_programming_languages_(basic_instructions)
http://en.wikipedia.org/wiki/Comparison_of_programming_languages
If you mean compilers to platform-independant code (like Java VM for Java language) you can look for CIL/MSIL (for C# and other .Net-based) and LLVM (low-level virtual machine, I guess its possible to find compilers for C and Haskell).
My suggestion is Scala. You can use all Java APIs on the JVM and you have a more concise, more powerful and cleaner language.
Nearly every language is somehow platform independent, thanks to the vendors or the community.
C/C++ (Boost, QT, etc.), C#/Java, Vala, Python/Ruby/Perl, PHP etc. etc., all these languages are platform independent, the only difference is that some are recompiled to the according platform, some are running on top of a framework and the others are interpreted languages.
Pretty much any language can be P.I. if someone writes a layer for it to run on which abstracts the underlying hardware.
By contrast, every platform requires someone to write such a layer before the 'PI' language can run on it.