Download presentation
Presentation is loading. Please wait.
1
Go To Statement Considered Harmful
by E.W. Dijkstra Mar. 1968 presented by Yuanhua Qu for spring CS5391
2
Go To Statement Considered Harmful
Overview Two Remarks Process The Go To Statement Acknowledgment
3
Overview The quality of programmers is a decreasing function of the density of go to statements in the programs they produce. The go to statement should be abolished from all "higher level" programming languages (i.e. everything except, perhaps, plain machine code).
4
Two Remarks First remark
programmer’s activity ends when correct program is constructed. Process is the true subject matter of his activity accomplish the desired effect satisfy the desired specifications in its dynamic behavior
5
Two Remarks Second remark
Our intellectual powers are rather geared to master static relations. Our powers to visualize processes evolving in time are relatively poorly developed. Therefore should shorten the gap between the static program and the dynamic process
6
Process (continued) textual index The progress of a process
is a pointer to a suitable place in the text The progress of a process can always be uniquely characterized by a (mixed ) sequence of textual and/or dynamic indices.
7
Process (continued) Indices provide independent coordinates in which to describe the progress of the process. An independent coordinate system can describe the process in a helpful and manageable way.
8
The Go To Statement Unbridled use of the go to statement has an immediate consequence that it becomes terribly hard to find a meaningful set of coordinates in which to describe the process progress. The go to statement as it stands is just too primitive; it is too much an invitation to make a mess of one’s program.
9
Acknowledgment The remark about the undesirability of the go to statement is far from new. Trace back to C.A.R.Hoare and Wirth. Guiseppe Jacopini seems to have proved the (logical) superfluousness of the go to statement. The end.
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.