Ada '83 Rationale, Sec 10.6: Summary and Conclusion
"Rationale for the Design of the
Ada® Programming Language"
[Ada '83 Rationale, HTML Version]
CHAPTER 10: Separate Compilation and Libraries
To summarize the Ada separate compilation facility:
Separate compilation has been designed as a user-oriented facility
that supports the traditional forms of program development. It can be
implemented at reasonable cost, as evidenced by the previous sections
and by previous languages supporting a similar separate compilation
facility such as Lis and Mesa. The type rules are enforced across
separate units to the same degree as within a given unit, and the
information contained in a program library can be used to check that
the compilation of a given unit does not use information from other
units that have become obsolete in the meantime.
- The compilation units of a program form a program library. Library
units can be declarations of packages, subprograms or generic
units, or generic instantiations. The bodies of library units are
separately compiled secondary units.
- Subunits of other compilation units can be defined by means of body
stubs. These subunits are separately compiled.
- The visibility rules applicable to compilation units are the usual
visibility rules, as complemented by with clauses. The order of
compilation and recompilation is governed by these rules.
Finally, one of the motivations of separate compilation is the
creation of software libraries. This is supported by Ada. By far the
most useful library units should be packages and generic packages. Ada
permits their use with the same degree of safety as for internal
It is expected that library packages will be used for the
encapsulation of type definitions, for common constants and data, and
for shared declarations. The fact that these library items are already
compiled program units, rather than source texts, offers a degree of
safety not found in languages that provide merely independent
Other compilation units will be used for the creation of user packages
such as input-output packages, to be found in libraries. The ability
to compile a package specification separately from the corresponding
package body provides the possibility of separating the interface of a
package from its implementation. Thus it supports information hiding
and reliability to an extremely high degree.
Address any questions or comments to