UMBC CMSC 201
CSEE | 201 | 201 F'06 | lectures | news | help
Go To Statement Considered Harmful, Edsger W. Dijkstra, Communications of the ACM, Vol. 11, No. 3, March 1968, pp. 147-148. For a number of years I have been familiar with the observation that the quality of programmers is a decreasing function of the density of go to statements in the programs they produce. More recently I discovered why the use of the go to statement has such disastrous effects, and I became convinced that the go to statement should be abolished from all "higher level" programming languages (i.e. everything except, perhaps, plain machine code). At that time I did not attach too much importance to this discovery; I now submit my considerations for publication because in very recent discussions in which the subject turned up, I have been urged to do so.
Since both break and continue alter the natural control flow of a program, we don't allow you to use them in your loops in CMSC 201. The notable exception is that most cases of the switch should have a break statement in them.