[plt-scheme] current-exception-handler

From: Robby Findler (robby at cs.uchicago.edu)
Date: Tue Mar 25 08:53:49 EST 2003

At Tue, 25 Mar 2003 04:04:11 -0500, Eli Barzilay wrote:
> Is there any reason for requiring `current-exception-handler' to
> escape?  Without this restriction, it would have been possible to play
> cute games like making (/ foo 0) return +inf.0 or -inf.0, making
> references to unbound variables create globals (so the set! on
> undefined variables could be done in Scheme), or my favorite -- catch
> an exn:arity for not enough variables, and create a closure so
> something like (map cons) returns the Right Thing.

You could play these tricks with macros or functional redefinition of
the primitives (/, #%app, #%top, etc), in a new language.


Posted on the users mailing list.