return when desugaring to closures

P T Withington ptw at
Tue Oct 14 11:01:58 PDT 2008

On 2008-10-11, at 08:34EDT, David Herman wrote:

> Thank you for pointing out, though, that try/catch isn't so easily  
> defined on top of return-to-label, since it still needs special  
> handling for finally. The options are either to define a lower-level  
> primitive underlying try/finally (akin to Scheme's dynamic-wind), or  
> to leave exceptions -- or at least try/finally -- as primitive. I  
> lean towards the latter; dynamic-wind is a subtle beast.
> [For those interested in dynamic-wind, Flatt et al's ICFP 07 paper  
> has a nice investigation into its semantics: 
> ]

My 2p:  If introducing a lower-level primitive would mean the language  
could someday have handler-binding (the ability to handle a condition  
in the frame it is signaled in), I think that would be a big win.

More information about the Es-discuss mailing list