How to implement continuations?

后端 未结 12 1584
清酒与你
清酒与你 2020-12-22 16:33

I\'m working on a Scheme interpreter written in C. Currently it uses the C runtime stack as its own stack, which is presenting a minor problem with implementing continuation

12条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-22 16:46

    The traditional way is to use setjmp and longjmp, though there are caveats.

    Here's a reasonably good explanation

提交回复
热议问题