of exceptions, or run-time errors, has been detected. Exception handling is
discussed in Chapter 14.
Program units can be generic in Ada. For example, it is possible to write
a sort procedure that uses an unspecified type for the data to be sorted.
Such a generic procedure must be instantiated for a specified type before
it can be used, which is done with a statement that causes the compiler to
generate a version of the procedure with the given type. The availability
of such generic units increases the range of program units that might be
reused, rather than duplicated, by programmers. Generics are discussed in
Chapters 9 and 11.
The Ada language also provides for concurrent execution of special pro-
gram units, named tasks, using the rendezvous mechanism. Rendezvous is the
name of a method of intertask communication and synchronization. Concur-
rency is discussed in Chapter 13.
2.14.4 Evaluation
Perhaps the most important aspects of the design of the Ada language to con-
sider are the following:
- Because the design was competitive, there were no limits on participation.
- The Ada language embodies most of the concepts of software engineer-
ing and language design of the late 1970s. Although one can question the
actual approaches used to incorporate these features, as well as the wisdom
of including such a large number of features in a language, most agree that
the features are valuable. - Although most people did not anticipate it, the development of a compiler
for the Ada language was a difficult task. Only in 1985, almost four years
after the language design was completed, did truly usable Ada compilers
begin to appear.
The most serious criticism of Ada in its first few years was that it was too
large and too complex. In particular, Hoare (1981) stated that it should not be
used for any application where reliability is critical, which is precisely the type
of application for which it was designed. On the other hand, others have praised
it as the epitome of language design for its time. In fact, even Hoare eventually
softened his view of the language.
The following is an example of an Ada program:
-- Ada Example Program
-- Input: An integer, List_Len, where List_Len is less
-- than 100, followed by List_Len-integer values
-- Output: The number of input values that are greater
-- than the average of all input values
with Ada.Text_IO, Ada.Integer.Text_IO;
use Ada.Text_IO, Ada.Integer.Text_IO;
2.14 History’s Largest Design Effort: Ada 83