February 23, 2026

GOTO is back, baby—via Scheme chaos

Emulating Goto in Scheme with Continuations

Scheme devs resurrect ‘goto’ with time‑travel tricks; purists panic, pranksters celebrate

TLDR: A Scheme tutorial shows how to mimic the old “goto” jump using a time‑travel‑like trick called call/cc. Comments split between praising constrained goto, pointing to deeper academic resources, and flaunting a playful C hack—highlighting the classic battle of power versus readable code.

Dijkstra tried to cancel “goto” back in 1968, calling it an invite to chaos. Today, Scheme tinkerers are saying “hold my compiler,” showing how to mimic goto using call/cc — basically a “save point” that lets your program jump back like a time‑travel remote. The demo even prints “The number is:” forever, which the crowd turned into a meme for “I broke it and I’m proud.”

The comments are where the fireworks happen. taeric confesses a guilty pleasure for Common Lisp’s TAGBODY — a fenced‑off, safer “goto” — and swears constrained chaos is actually useful. umanwizard swoops in to nitpick the example code like a hall monitor, while soegaard drops the academic hammer with links to serious reading on continuations, including Friedman’s papers. Then Trung0246 crashes the party with a “very funny” C version of the trick, no assembly required, flexing with a gist demo.

The vibe: half the crowd cheers “goto, but responsibly,” half whispers “please read the papers,” and the rest just want to see how far they can push the time‑travel button. It’s messy, it’s clever, and it’s the perfect internet showdown over power versus readability — with plenty of jokes along the way.

Key Points

  • The article proposes emulating GOTO in Scheme using call/cc and syntactic abstraction.
  • It reviews GOTO behavior in BASIC and shows a C example using goto labels for centralized cleanup within a function.
  • call/cc captures the current continuation and passes it to a procedure, enabling re-entry into the remaining computation.
  • Examples demonstrate that invoking a continuation differs from normal procedure calls and can cause repeated execution or loops.
  • Scheme’s multiple values can be understood as immediately invoking the current continuation with several arguments.

Hottest takes

"I confess I like Common Lisp's TAGBODY far more than I feel like I should" — taeric
"If you are into continuations, check Friedman's papers" — soegaard
"Here's my very funny implementation of delimited continuation in plain C" — Trung0246
Made with <3 by @siedrix and @shesho from CDMX. Powered by Forge&Hive.