Re: [Scheme-reports] 4.2.7. Exception Handling Andy Wingo (18 May 2011 14:29 UTC)
Re: [Scheme-reports] 4.2.7. Exception Handling Alaric Snell-Pym (18 May 2011 14:40 UTC)
Re: [Scheme-reports] 4.2.7. Exception Handling Andy Wingo (18 May 2011 15:15 UTC)
Re: [Scheme-reports] 4.2.7. Exception Handling Jim Rees (18 May 2011 16:22 UTC)
Re: [Scheme-reports] 4.2.7. Exception Handling Jim Rees (18 May 2011 16:58 UTC)
Re: [Scheme-reports] 4.2.7. Exception Handling Andy Wingo (18 May 2011 17:35 UTC)
Re: [Scheme-reports] 4.2.7. Exception Handling John Cowan (18 May 2011 19:04 UTC)
Re: [Scheme-reports] 4.2.7. Exception Handling John Cowan (18 May 2011 19:03 UTC)
Re: [Scheme-reports] 4.2.7. Exception Handling Andy Wingo (20 May 2011 10:46 UTC)
Re: [Scheme-reports] 4.2.7. Exception Handling Aaron W. Hsu (20 May 2011 17:02 UTC)
Re: [Scheme-reports] 4.2.7. Exception Handling Andy Wingo (20 May 2011 17:17 UTC)

Re: [Scheme-reports] 4.2.7. Exception Handling John Cowan 18 May 2011 19:03 UTC

Andy Wingo scripsit:

> Are you sure? :-) The spec notes:
>
>   "That implicit `cond' expression is evaluated with the continuation
>   and dynamic extent of the `guard' expression"
>
> and
>
>   "The final expression in a <cond> clause is in a tail context if the
>   `guard' expression itself is."

The idea is that "guard" installs a handler which first unwinds and then
evaluates the cond, rewinding if it doesn't find an appropriate clause.
This provides termination semantics in the style of C++, Java, C#, etc.
but with the possibility of carrying on if the guard gets something it
doesn't expect.  If you want instead to get control in the scope of the
raiser, don't use "guard" but rather "with-exception-handler" to install
your own handler.

--
It was impossible to inveigle           John Cowan <cowan@ccil.org>
Georg Wilhelm Friedrich Hegel           http://www.ccil.org/~cowan
Into offering the slightest apology
For his Phenomenology.                      --W. H. Auden, from "People" (1953)

_______________________________________________
Scheme-reports mailing list
Scheme-reports@scheme-reports.org
http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports