[erlang-questions] Old school exceptions vs. new age one

Richard Carlsson <>
Tue Apr 29 16:59:40 CEST 2008


Tony Finch wrote:
>> On the contrary - the exception handling in ML lacks the
>> success-case branch that you get in Erlang with try...of...
>> (hence, it is ML that needs to be turned into Erlang). :-)
> 
> You have probably seen this paper which does just that:
> http://research.microsoft.com/~akenn/sml/ExceptionalSyntax.pdf

Yes. I hadn't seen it when we did our work on try/catch and wrote our paper, 
though, and Phil Wadler who was on the Workshop committee didn't recall the 
Benton & Kennedy paper either, until some months afterwards (he then pointed 
me to their paper and vice versa, which was very nice of him).

The background is that B&K was published in 2001, and by then we had been 
talking about try/catch for a couple of years - practically since the 
C++-like suggestion by Barklund in ~1998 (which turned out to be problematic 
when we tried to implement it), and we weren't on the lookout for papers 
with sudden, new solutions to a rather old problem. I can trace the 
"try...of..." syntax in our repository to January 2003 (if anyone's 
interested - It's not that I feel that I need to defend anything).

I can remember drawing a diagram of the control flows on my whiteboard and 
thinking "what is missing in this picture", and going "hey...". And then I 
realized that the corresponding syntax was much like what a chap had 
suggested in passing during a workshop a couple of years before (maybe he 
had read B&K?), which I had dismissed as "easy to do using a temporary 
constructor". Sometimes, it seems, it's just that the time for an idea has 
arrived. Reading B&K could have saved me some work, though.

     /Richard





More information about the erlang-questions mailing list