Browse thread
Exception inferrence (was: Re: [Caml-list] Today's inflamatory opinion: exceptions are bad)
- Chris King
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: | 2006-12-11 (00:18) |
From: | Chris King <colanderman@g...> |
Subject: | Exception inferrence (was: Re: [Caml-list] Today's inflamatory opinion: exceptions are bad) |
(Changed the subject to avoid highjacking Brian's thread more than I already have...) On 12/10/06, Jon Harrop <jon@ffconsultancy.com> wrote: > On Sunday 10 December 2006 03:35, Chris King wrote: > > One thing Java (sort of) gets right is keeping track of which > > exceptions a function can throw, making it easy to ensure that some > > deeply nested piece of code won't cause the entire application to die > > from some obscure exception. I'd love to see a similar feature in > > O'Caml, whereby the exceptions which a function can raise are part of > > its type and are inferred and checked by the compiler. > > This has been done. There was a tool called ocamlexc that did whole-program > analysis to find out which exceptions could propagate where. However, it > wasn't useful enough to be kept up to date. > > http://caml.inria.fr/pub/old_caml_site/ocamlexc/ocamlexc.htm Hah, I feel foolish... the bottom of that page links [1] to a paper co-authored by Xavier Leroy himself describing an exception inference system for O'Caml. I wonder if it has been considered for inclusion in the compiler, and, if so, why it was rejected? - Chris