A Short
MAINSAIL Overview
MAINSAIL was originally developed at Stanford University under the auspices of the SUMEX Computer Project by the founders of XIDAK, Inc. It is an ALGOL-like programming language derived from the SAIL programming language. SAIL was developed at the Artificial Intelligence Laboratory of Stanford University. MAINSAIL retains some of the most popular features of SAIL, such as variable-length strings and garbage collection, but eliminates all the machine-dependent characteristics of SAIL.
MAINSAIL was specifically designed to provide true source-level portability. The entire MAINSAIL compiler and the bulk of the runtime system are written in MAINSAIL, minimizing the effort required by XIDAK to move MAINSAIL to a new processor or operating system. MAINSAIL's unprecedented level of portability allows XIDAK to guarantee a uniform programming environment across all MAINSAIL implementations.
MAINSAIL is an extremely powerful programming language offering features not found in other popular programming languages such as C, Pascal, Modula-2, or Ada. Independently of its complete portability, MAINSAIL is an outstanding choice for most programming tasks, even those that are not intrinsically portable.
MAINSAIL provides a complete I/O interface that supports sequential and random access to files of text or data. Terminal interaction is also part of the I/O interface.
MAINSAIL provides a very powerful module facility similar to the "class" concept of SIMULA. Modules are both the unit of compilation and the unit of execution. They can be used as packaging devices or for the implementation of abstract data types. Modules can be embedded in data structures by means of pointers, and multiple copies of a module can be dynamically allocated and deallocated.
Other powerful features include dynamic arrays and records, all subject to the automatic storage reclamation strategy known as "garbage collection", which is usually available only in very-high-level languages, such as LISP.
Unlike most commercially available programming languages, MAINSAIL programs are not statically linked. A statically linked language requires all code that might be used in a particular execution to be loaded when any program written in that language begins execution. In MAINSAIL, object modules are loaded as needed; in a large system, this may result in far less code being in memory if much of the code is needed only occasionally. The code constituting a MAINSAIL "program" is therefore determined dynamically.
MAINSAIL was designed to simplify the management and maintenance of large programming projects involving many programmers. The compiler and runtime system provide extensive facilities for incremental development of components and subsequent integration of components into a complete system.
MAINSAIL is a "natural" programming language; programmers can program the way they think. Programmers need not revert to programming "tricks" or obscure coding techniques to get their jobs done. MAINSAIL's clear, clean syntax makes it easy to understand MAINSAIL programs. This dramatically reduces the resources required for both program development and program maintenance.
MAINSAIL is a broad-spectrum programming language. Its utility spans the range of applications, from systems programming, such as compilers and text editors, through scientific and technical applications, to business and financial applications. MAINSAIL runs on a diverse set of processors, from mainframes to microprocessors. Great care has been taken to provide a language definition that supports compatible implementations across such a wide range of machines. An approach that uses the same compiler, runtime system, and support software across all implementations is the key to such compatibility.