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?
            Asked
            
        
        
            Active
            
        
            Viewed 483 times
        
    4
            
            
         
    
    
        Michael
        
- 10,185
- 12
- 59
- 110
- 
                    To use `shift` and `reset` you have to use the continuations compiler plugin. But I cannot tell you what exactly is done by the plugin. – michael.kebe May 19 '11 at 06:45
- 
                    You will get this error if try to compile without the plugin: `"this code must be compiled with the Scala continuations plugin enabled"` Have a look at http://stackoverflow.com/questions/2683195/how-do-i-enable-continuations-on-scala-2-8 – michael.kebe May 19 '11 at 06:53
1 Answers
9
            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.
 
    
    
        Przemek Pokrywka
        
- 2,219
- 17
- 23