3 ms·
Or provide continuations and use them to implement coroutines.
by mratsim 3y ago
Or provide continuations and use them to implement coroutines.
- qudat 3y agoA couple of us have been experimenting with deliminited continuations and I think it’s gonna take off soon in TS https://youtu.be/uRbqLGj_6mI?si=kgKKjpCnehJ9bpIG https://youtu.be/uRbqLGj_6mI?si=kgKKjpCnehJ9bpIG https://github.com/neurosnap/starfx https://github.com/neurosnap/starfx https://github.com/thefrontside/effection/tree/v3 https://github.com/thefrontside/effection/tree/v3
- vacuity 3y agoTo my understanding, delimited continuations and coroutines are equivalent in power. Out of curiosity, can delimited continuations be implemented as efficiently (in Rust or otherwise) as stackless coroutines?
- vore 3y agoThese don’t look like continuations to me, just ways to use generators? Continuations would involve reifying the current control flow into a value, which these examples don’t seem to do and still rely on generators to yield control.
- qudat 3y agoThese libraries rely on deliminited continuations: https://github.com/thefrontside/continuation https://github.com/thefrontside/continuation Because of this tiny implementation we are able to express any async flow construct with less code than relying on something like async/await or callbacks.
- smasher164 3y agoSingle-shot continuations in the form of lexical effect handlers would be a good fit for a systems language nowadays. I feel it's a bit too late to staple that onto Rust though.