4 ms·
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
by goto11 3y 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.
- zozbot234 3y agoSome 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.
- goto11 3y agoBut 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.