Write once, compile anywhere

From Wikipedia, the free encyclopedia
Jump to: navigation, search

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. 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 the Lazarus IDE via its LCL and corresponding widgetsets.

See also[edit]