Write once, compile anywhere

From Infogalactic: the planetary knowledge core
Jump to: navigation, search

Lua error in package.lua at line 80: module 'strict' not found. Write once, compile anywhere (WOCA) is a philosophy taken by a software platform which refers to a capability of writing a computer program that can be compiled on all platforms without the need to modify its source code. As opposed to Sun's write once, run anywhere slogan, cross-platform compatibility is implemented only at the source code level, rather than also at the compiled binary code level.

There are many languages that follow the WOCA philosophy, such as C++, Pascal (see Free Pascal), Ada or C, on condition that they don't use functions beyond those provided by the standard library. Languages like Go go even further in as far that no system specific things are used, it should just work, and for system-specific elements a system of platform-specific files is used. A computer program may also use cross-platform libraries, which provide an abstraction layer hiding the differences between various platforms, for things like sockets and GUI, ensuring the portability of the written source code. This is e.g. supported by Qt or the Lazarus IDE via its LCL and corresponding widgetsets.

See also

<templatestyles src="Asbox/styles.css"></templatestyles>