|
|
|
|
|
by jfoutz
865 days ago
|
|
I’m having trouble recalling, call cc just fixes the stack, right? If you mess with the heap, that sticks around? The backtracking example is a good one. I vaguely remember needing to be careful about global state, or visible in a given context. It’s not awful, but a little tricky. |
|
Also an activation frame per se is immutable, but not the objects referenced by it, so all modifications are preserved when invoking a continuation.
[1] this is just a model, in practice there are many ways to implement this that optimize for the common FIFO allocation discipline.