3 ms·
>Iirc Oleg Kiselyov implemented proper delimited continuations in ocaml as a library, without touching the runtime or compiler. To clarify this, the library yo
by fasquoika 8y ago
>Iirc Oleg Kiselyov implemented proper delimited continuations in ocaml as a library, without touching the runtime or compiler.
To clarify this, the library you're talking about implements most of the functionality in C, reusing the runtime's exception mechanism. So it doesn't require any upstream change to compiler or runtime, but it also can't be implemented in pure OCaml.
- bjoli 8y agoHmmm. I remembered incorrectly then. The bytecode version is possible in pure ocaml, but for native it apparently needs C. For Haskell it is however possible. There is a neat paper by among others Kent Dybvig.