3 ms·
When Scheme folks get hot and bothered about continuations not being gotos what they normally mean is that the idea of a continuation is much more fundamental.
by jarcane 11y ago
When Scheme folks get hot and bothered about continuations not being gotos what they normally mean is that the idea of a continuation is much more fundamental.
I've found a much more elemental way of thinking of it is that it's not goto, but rather a tool you can use to make a goto. Or a break, or a yield, or coroutines like is mentioned in the article, and so on. Racket's web framework does an insane amount of clever things with continuations for everything from concurrent request handling to templating forms in functions that return HTML.
It gives you first-class control over control structures to a degree that still, frankly, seems like magic to me at times even though I've used continuations in several projects now.