proomt

Search

Search posts, papers, and topics

Hall of Fame

Hall of FameEdsger W. Dijkstra19687 min readintermediate

Go To Statement Considered Harmful

Summary

Edsger Dijkstra argues that the `go to` statement should be abolished from higher-level programming languages due to its detrimental effect on program quality and readability. He posits that `go to` makes it difficult to reason about program state and progress, unlike structured control flow which provides clear, manageable execution coordinates.

  • The density of `go to` statements correlates inversely with program quality.
  • Unconstrained `go to` statements make it hard to find meaningful coordinates to describe program progress.
  • Structured control flow (conditionals, loops, procedures) allows for a clear, programmer-independent way to track execution.
  • Human intellect is better suited to mastering static program relations than visualizing dynamic processes.

This foundational paper significantly influenced the shift towards structured programming, impacting language design and software engineering practices for decades.

9/10

Related reading

  1. Structured Programming with go to Statements

    Knuth's 1974 paper examines the `goto` statement controversy in structured programming, arguing for a balanced view rather than outright abolition. It explores how improved language constructs can reduce `goto` usage, while also considering cases where `goto` or equivalent constructs might be necessary for efficiency or clarity in transformed code.

    Hall of Fameplover.com130 minpaperHN3
  2. Article: Your Next DSL Author Is a Language Model

    Typed Domain Grounding (TDG) embeds a DSL inside a mainstream language the LLM already knows (e.g., Kotlin) and uses the host compiler as an oracle. The author describes five building blocks—embedding, choosing a host language with high training‑data frequency, compiler‑driven type safety, a generate‑compile‑repair loop, and an on‑demand teaching tool—and shows measured results from kUML, a Kotli…

    InfoQinfoq.com18 min