3 ms·
Andy Wingo uses delimited continuations to implement guile fibers https://github.com/wingo/fibers/wiki/Manual https://github.com/wingo/fibers/wiki/Manual It is
by bjoli 8y ago
Andy Wingo uses delimited continuations to implement guile fibers https://github.com/wingo/fibers/wiki/Manual https://github.com/wingo/fibers/wiki/Manual
It is a low level construct that can be used to build higher abstractions and things like coroutines. In a language like scheme they can also be a (costly) way to do early escapes.
If you are into nondeterminism they are also quite usable.
call/cc is being retired in favour of delimited continuations, which is a good thing.
Most often you don't need them. Implementing things like generators using continuations is possible, but it is also a lot slower than built in support for generators.
- hawski 8y agoI just started learning a bit of Scheme. From what I read Chicken Scheme has very cheap call/cc. Even its domain name is call-cc.org. Is that very rare around Scheme implementations? Currently I'm thinking about Kawa for Android, maybe Bigloo for Windows (.NET) and Gambit for everything else. And I start to wonder how different implementations have different properties even among compiled ones. Edit: a typo: s/Kiwi/Kawa/
- i_feel_great 8y agoLook up LambdaNative.org. It is based on Gambit, and will run on all common platforms. And I think you mean Kawa Scheme, not Kiwi.
- hawski 8y agoI read about it - it uses Gambit everywhere and draws its own widgets. On Android it has to use JNI. I'm thinking about wxWidgets in Scheme, but with almost none FFI penalty on every platform.
- bjoli 8y agoChicken has free call/cc due to the Cheney on the MTA memory management. This is very rare. Most often it doesn't matter much, since call/cc is rare enougn. I would still prefer delimited continuations since they are easier to reason about. Most often you pick one implementation and stick with it. Scheme is not like CL where you can run the same program on many different implementations without much fuss. Chicken is a very nice implementation with the most friendly IRC channel on freenode.