You'd expect this program to evaluate to 100, but with Filinski's implementation, it raises the uncaught exception 'boo. The same example with MzScheme's native delimited continuations yields 100.(reset (lambda ()
(+ (shift (lambda (k)
(with-handlers ([symbol? (lambda (exn) 100)])
(k 1))))
(raise 'boo))))
Monday, November 13, 2006
Non-native shift/reset with exceptions
Filinski's implementation of shift and reset has undesirable behavior in a language with exceptions. Consider the following example:
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment