Question about Scala continued

As I understand it, shift and reset are just library functions. Is it right that all continuation materials are implemented in the form of a library, and the Scala compiler does not do any special work to convert the code inside the reset block?

+4
source share
1 answer

No, it is not. Part of this support is in the library, and another part is in the compiler. The compiler plugin converts the code inside reset to a continuation form. You must have this compiler plugin in the build process. In runtime, the standard scala library is sufficient.

+9
source

All Articles