Lably
Skip to content

Write once, compile anywhere

Design goal for source code to be universally compilable

  • 5 min read
  • 4 chapters

Related on Lably

Through Software, Technology and Compiler

WOCA differs from write once, run anywhere (WORA), a stated goal of the Java, in which cross-platform support relies on and is at the bytecode level. Other technologies such as .NET also use bytecode to achieve the same goal.

Introduction

There are many languages that aim to allow developers to follow the WOCA philosophy, such as C++, Pascal (see Free Pascal), Ada, Cobol, 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, for example, supported by Qt (C++) or the Lazarus (Pascal) IDE via its LCL and corresponding widgetsets.

Present-day computers often have applications such as word processing, Database management, and spreadsheets, that allow people with no programming experience to, sort, extract, and manipulate their data. These applications can create documents (such as PDF files) showing their now organized information, or printing it out. Before 2000, some of these were not available, and prior to 1980, almost none of them were.

From the start of computer automation in the early 1960s, if you wanted a report from data you had, or needed to print up invoices, payroll checks, purchase orders, and other paperwork businesses, schools and governments generated, you typed them up on a physical typewriter, possibly using pre-printed forms. Otherwise, if you did have information stored in a computer, and wanted it sorted, manipulated, or printed, it required someone to write a program to do so. In some cases, the person needed information that professional programmers either could not understand how to provide a program to do what they wanted; the available programmers could not produce something in a reasonable amount of time; or there weren't any programmers they could use, caused some non-programming professionals to learn some programming skills, at least to know how to manipulate and print out information they needed from their data.

Whether the work was done by a professional programmer, or an end-user writing a program to provide them information for their own use, the means to do this in either case is the same. Write a program, submit it to a compiler (another program that converts written programs into instructions the computer can understand), fix any errors, then repeat until the program worked.

While this helped fix part of the problem, it created a new one. People who wrote programs, or hired someone to write them (purchasing software was not a thing until the 1970s or 1980s), discovered when their employer or school bought a new computer, their programs no longer worked.

Sign in to keep reading

3 more chapters are free with a Lably account.

More in Computing and communication