That’s one option. But the unfortunate conclusion of that choice is that continuations leak a lot of memory. One shot continuations are better, since it frees up the variable references.
I don't see how this is different from lambdas in general, in JS/Python/etc... wouldn't it only be held as long as the variables are alive? If you use the callback only once then they should be eligible to be freed after being used once.
Thanks for the link! Unfortunately I don't understand what it's saying the issue is... would you have a simple example to illustrate? It's been years since I did Scheme, I've never actually needed to use call/cc in a program, and I'm not advanced enough in Scheme to have seen shift/reset (as with call/c, their documentation is not quite clear). :\