On Tue 07 Jan 2020 00:14, Chris Vine <vine35792...@gmail.com> writes:
> I wonder if it would surprise the programmer to have the cond > conditionals evaluated in a different dynamic environment from the one > in which the cond consequential is evaluated where there is a > conditional which is true. I entirely agree it's not ideal and can be surprising! I am not sure that there is an "ideal" here though; with-exception-handler is wonderfully expressive but can be verbose, guard is a pleasant abbreviation but how to deal with re-raising from the original context? In the end, "guard" is just a macro over a more general facility. But it's a macro that we expect people to use, and to cover the common case. To that end I think we should make it cheap and avoid rewinding while also preserving the nice characteristic of evaluating cond consequents in the continuation of the "guard" itself. Andy