News for hackers. Stuff that matters.
Re:Crafting Interpreters: Classes by Rusky on Monday October 30, 2017 @11:33PM (#15590930)
One way to do delimited continuations might be to build on the state machine transformation behind generators and async/await. You can drop the `await`/`yield` primitives that C#/Javascript use and introduce a `shift` primitive instead. In non-recursive situations you can even make the continuation objects statically sized.

Kotlin goes this direction, for example, though it still requires an annotation on all functions that participate in continuations. This makes it fairly straightforward to tell where the `prompt` is- the root `suspend fun` passed to whatever API drives it. Making every function implicitly `suspend` would let you treat any function as a `prompt`.

Re:Crafting Interpreters: Classes by mamcx on Tuesday October 31, 2017 @10:37PM (#15598474)
Any example in how this is done? The info I have gathered is none what you have described!
Re:Crafting Interpreters: Classes by Rusky on Wednesday November 01, 2017 @04:39PM (#15605259)
The best examples would just be the implementations of yield/async/await in C#, Javascript, Kotlin, Rust, etc. The only novel thing I'm proposing here is a shift in the syntax from explicit suspension points and implicit initiation of async operations, to implict suspension points and explicit initiation of async operations. Kotlin (which I mentioned) already mostly does this.