User loginNavigation 
Generic implementation of all four *F* operators: from control0 to shiftUnlike the previous approaches, the latest implementation is generic. Shift and control share all the same code, and differ in only one boolean flag. Therefore, it becomes possible to mix different control operators in the same program. Furthermore, the latest implementation is direct rather than emulation (in terms of an objectlevel shift), therefore, it has the best performance. The code is surprisingly simple, compared with the previous implementation of 'control' by Sitaram and Felleisen, and does not require equality on continuations. All four delimited control operations do indeed reduce to call/cc and one global mutable cell, and hence have a quite simple CPS transform. That has been known since the paper by Chungchieh Shan (Scheme Workshop, 2004). The current code shows that result more directly. Oleg's implementation provides all four FriedmanFelleisen delimited control operators: from F (similar to cupto) to +F (aka control) to +F+ (aka shift). The R5RS Scheme code is parameterized by two boolean flags: isshift and keepdelimiteruponeffect. All four combinations of the two flags correspond to four delimited control operators. 
Browse archivesActive forum topics
New forum topics

Recent comments
5 hours 47 min ago
5 hours 58 min ago
1 day 11 hours ago
6 days 18 hours ago
1 week 1 day ago
2 weeks 5 days ago
3 weeks 4 days ago
4 weeks 4 days ago
6 weeks 2 days ago
6 weeks 5 days ago