2 ms·
I should also add that though call/cc is a parlor trick, continuation passing style (CPS) is not. Making continuations explicit is a standard technique in comp
by cryptonector 8y ago
I should also add that though call/cc is a parlor trick, continuation passing style (CPS) is not. Making continuations explicit is a standard technique in compiler design, and it pays off handsomely.
Also, while i'm at it, call/cc can be used to implement co-routines, which is fine enough, though coroutines can also just be provided by the language anyways. It is elegant that you can get co-routines as simple function calls rather than code that has to save/restore registers.