Platform independence is a term that describes a technology (usually a ProgrammingLanguage
or a FrameWork
) that you can use to implement things on one machine and use them on another machine without (or with minimal) changes.
There are two basic types of PlatformIndependence
Binary Platform Independence
Languages like Java (JavaLanguage
) or Python (PythonLanguage
) use a VirtualMachine
to run and therefore can be transported from one machine to another in their compiled, binary format. CsharpLanguage
seems to be moving in that direction as well, by way of the MonoProject
Source Platform Independence
ANSI C (CeeLanguage
) and ANSI C++ (CeePlusPlus
) could be considered platform independent to the extent that the source needs no change (or almost no change) to be moved from one type of machine to another. The source needs to be recompiled for each platform. If the programmer adheres to strict ANSI standards, programs in both languages should compile and run nicely on all platforms.
ScriptingLanguage / InterpretedLanguage platform independence
can also be listed here - it doesn't compile into a binary distributable and most Perl programs (especially text based ones) can run on many platforms. There needs to be an interpreter for each platform.
is discussed, usually the three major platforms are concerned : MS Windows, POSIX/Unix, Mac. (Although MacOS is unix. It's only the GUI that's weird. -- JasonGrossman
Also the domain of the AutoConf
systems, which try to detect and adapt to differences between different Unix systems.
Cross-compiling is another technique used to write code on one machine and run the correponding executable on another machine. Cross-compiling is heavily used in EmbeddedSystem
s, where the "other machine" may lack a keyboard or enough RAM to run a compiler.
See also: AlternateHardAndSoftLayers