Edsger W. Dijkstra's article "Go To Statement Considered Harmful" argues that the use of go to statements in programming is detrimental to program intelligibility and maintainability. Dijkstra explains that go to statements disrupt the natural flow of control, making it difficult for programmers to understand and follow the logic of a program. He emphasizes that the process controlled by a program is the true subject of the programmer's activity, and that the dynamic behavior of this process must satisfy the desired specifications. However, once the program is written, the machine executes it, and the programmer's role is to ensure that the program is correct.
Dijkstra argues that human intellectual capabilities are better suited to understanding static relations than dynamic processes. Therefore, programmers should strive to minimize the conceptual gap between the static program and the dynamic process. He suggests that using structured programming constructs such as conditional clauses, alternative clauses, and repetition clauses can help achieve this goal. These constructs allow for a more direct correspondence between the program and the process, making it easier to understand and maintain.
Dijkstra also discusses the use of procedures and the need for a sequence of textual indices to describe the dynamic progress of a process. He argues that the use of go to statements makes it difficult to maintain a consistent set of coordinates for describing the progress of a process. Instead, he advocates for the use of structured programming constructs that provide a more systematic and manageable way to describe the dynamic behavior of a program.
In conclusion, Dijkstra's article argues that the use of go to statements is harmful to the clarity and maintainability of programs. He advocates for the use of structured programming constructs that provide a more systematic and manageable way to describe the dynamic behavior of a program.Edsger W. Dijkstra's article "Go To Statement Considered Harmful" argues that the use of go to statements in programming is detrimental to program intelligibility and maintainability. Dijkstra explains that go to statements disrupt the natural flow of control, making it difficult for programmers to understand and follow the logic of a program. He emphasizes that the process controlled by a program is the true subject of the programmer's activity, and that the dynamic behavior of this process must satisfy the desired specifications. However, once the program is written, the machine executes it, and the programmer's role is to ensure that the program is correct.
Dijkstra argues that human intellectual capabilities are better suited to understanding static relations than dynamic processes. Therefore, programmers should strive to minimize the conceptual gap between the static program and the dynamic process. He suggests that using structured programming constructs such as conditional clauses, alternative clauses, and repetition clauses can help achieve this goal. These constructs allow for a more direct correspondence between the program and the process, making it easier to understand and maintain.
Dijkstra also discusses the use of procedures and the need for a sequence of textual indices to describe the dynamic progress of a process. He argues that the use of go to statements makes it difficult to maintain a consistent set of coordinates for describing the progress of a process. Instead, he advocates for the use of structured programming constructs that provide a more systematic and manageable way to describe the dynamic behavior of a program.
In conclusion, Dijkstra's article argues that the use of go to statements is harmful to the clarity and maintainability of programs. He advocates for the use of structured programming constructs that provide a more systematic and manageable way to describe the dynamic behavior of a program.