itly expressed his doubts whether
the go to statement should be
treated on equal syntactic footing
with the assignment statement. To
a modest extent I blame myself
for not having then drawn the
consequences of his remark.
The remark about the undesir-ability of the go to statement is far
from new. I remember having
read the explicit recommendation
to restrict the use of the go to
statement to alarm exits, but I
have not been able to trace it; presumably, it has been made by
C.A.R. Hoare. In [ 1, Sec. 3. 2. 1.]
Wirth and Hoare together make a
remark in the same direction in
motivating the case construction:
“Like the conditional, it mirrors
the dynamic structure of a program more clearly than go to
statements and switches, and it
eliminates the need for introducing a large number of labels in the
program.”
In [ 2] Guiseppe Jacopini seems
to have proved the (logical) super-fluousness of the go to statement.
The exercise to translate an arbitrary
flow diagram more or less mechanically into a jumpless one, however,
is not to be recommended. Then
the resulting flow diagram cannot
be expected to be more transparent
than the original one.
REFERENCES
1. Wirth, Niklaus, and Hoare, C.A.R. A contribution to the development of ALGOL.
Comm. ACM 9 (June 1966), 413–432.
2. Bohn, Corrado, and Jacopini, Guiseppe. Flow
Diagrams, Turing machines and languages
with only two formation rules. Comm. ACM 9
(May 1966) 366–371.
EDSGER W. DIJKSTRA
Technological University
Eindhoven, The Netherlands
Communications of the ACM
March 1968, Vol. 11, No. 3, pg 147
Coming Next Month in
COMMUNICATIONS
Alternate Reality Gaming
IT Diffusion in Developing Countries
Are People Biased in their Use of Search
Engines?
The Factors that Affect Knowledge-Sharing
Behavior
Alternative Scenarios to the “Banner” Years
Municipal Broadband Wireless Networks
The Myths and Truths about Wireless Security
Managing Large Collections of Data Mining
Models
Women and Men in IT: Alike or Different?