As I understand shift
and reset
are just library functions. Is it correct that all continuation stuff is implemented as a library and Scala compiler does not do any special work to transform the code inside the reset
block?
No, that's not the case. Part of that support is in library and the other part in a compiler plugin. The compiler plugin transforms the code inside reset to continuation-passing form. You need to have this compiler plugin in your build process. In the runtime, scala standard library is sufficient.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With