IT lexicon › Programming › GOTO Considered Harmful

GOTO Considered Harmful

Programming På svenska → Updated: 2026-11-13

Edsger Dijkstra's landmark 1968 paper arguing that unrestricted goto statements make programs difficult to reason about and that structured programming without goto produces higher-quality code.

Dijkstra demonstrated that unconstrained use of goto leads to code whose control flow becomes nearly impossible to follow. His article "Go To Statement Considered Harmful" was a watershed moment in programming language evolution and directly led to the introduction of if, while, and for loops as goto replacements. It was one of the first times computer science systematically argued against a language construct based on readability and correctness reasoning.

Even modern languages like Go, Rust, and Python either forbid goto or restrict it severely, showing the lasting impact of Dijkstra's paper. A few languages retain goto for low-level optimization in kernel and system code, but it has long been considered an antipattern in higher-level programming. The paper helped establish the principle that how you write code matters as much as what it computes.

← Back to the lexicon