Concepts of Programming Languages

(Sean Pound) #1

70 Chapter 2 Evolution of the Major Programming Languages



  • Subprograms were allowed to be used recursively, but the capability could
    be disabled, allowing more efficient linkage for nonrecursive subprograms.

  • Pointers were included as a data type.

  • Cross-sections of arrays could be referenced. For example, the third row
    of a matrix could be referenced as if it were a single-dimensioned array.


2.8.4 Evaluation


Any evaluation of PL/I must begin by recognizing the ambitiousness of the
design effort. In retrospect, it appears naive to think that so many constructs
could have been combined successfully. However, that judgment must be tem-
pered by acknowledging that there was little language design experience at the
time. Overall, the design of PL/I was based on the premise that any construct
that was useful and could be implemented should be included, with insufficient
concern about how a programmer could understand and make effective use
of such a collection of constructs and features. Edsger Dijkstra, in his Turing
Award Lecture (Dijkstra, 1972), made one of the strongest criticisms of the
complexity of PL/I: “I absolutely fail to see how we can keep our growing
programs firmly within our intellectual grip when by its sheer baroqueness
the programming language—our basic tool, mind you!—already escapes our
intellectual control.”
In addition to the problem with the complexity due to its large size, PL/I
suffered from a number of what are now considered to be poorly designed
constructs. Among these were pointers, exception handling, and concurrency,
although we must point out that in all cases, these constructs had not appeared
in any previous language.
In terms of usage, PL/I must be considered at least a partial success. In the
1970s, it enjoyed significant use in both business and scientific applications. It
was also widely used during that time as an instructional vehicle in colleges,
primarily in several subset forms, such as PL/C (Cornell, 1977) and PL/CS
(Conway and Constable, 1976).
The following is an example of a PL/I program:

/* PL/I PROGRAM EXAMPLE
INPUT: AN INTEGER, LISTLEN, WHERE LISTLEN IS LESS THAN
100, FOLLOWED BY LISTLEN-INTEGER VALUES
OUTPUT: THE NUMBER OF INPUT VALUES THAT ARE GREATER THAN
THE AVERAGE OF ALL INPUT VALUES */
PLIEX: PROCEDURE OPTIONS (MAIN);
DECLARE INTLIST (1:99) FIXED.
DECLARE (LISTLEN, COUNTER, SUM, AVERAGE, RESULT) FIXED;
SUM = 0;
RESULT = 0;
GET LIST (LISTLEN);
IF (LISTLEN > 0) & (LISTLEN < 100) THEN
Free download pdf