I would like to know a programming languages that natively support delimited continuations. I do know that Scala used to have shift and reset, but those were removed; and I also know that Seaside seems to have something similar, but Seaside is a library, and as far as I understand, Smalltalk doesn't have support for delimited continuations.
So, is there a programming language that supports such continuations?
Thank you!
In most Smalltalk dialects you can trivially implement delimited continuations (or any other type of continuation). Due to the highly reflective nature of the environment, you can walk over the runtime stack and copy and reinstantiate any part of the execution stack. In fact, this is exactly what Seaside is doing.
Have a look at the different types of continuations implemented in these Monticello packages: http://source.lukas-renggli.ch/continuations/. The
Continuationpackage includes tests and examples of various types of full and partial continuations (reset-shift and prompt-control style). TheGeneratorspackage includes an implementation of generators.