Hacker News new | ask | show | jobs
by goto11 910 days ago
GOTO does not pass a continuation though, so I can't see how it is similar to continuation-passing style. GOTO is just a jump like jumps in machine code.

BASIC does not have notion of a continuation as a value.

1 comments

Some BASICs such as BBC BASIC allowed GOTO to take a variable or expression directly, and many BASICs supported the ON..GOTO construct that allows for the same. And turning all control flow within a program into jump-like operations is arguably the main point of CPS.
But this is just computed gotos. There is no continuation passed.

Arguably the main point of continuation-passing style is that you pass a continuation along with the jump. Hence the name.