English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
[Caml-list] GC and file descriptors
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2003-11-18 (23:49)
From: Benjamin Geer <ben@s...>
Subject: Re: [Caml-list] GC and file descriptors
Xavier Leroy wrote:
>>If the type of a function included its exception specification,
>>could Caml infer exception specifications?
> Yes, with the proviso that you need a fairly sophisticated exception
> analysis to get enough precision in practice.  See for instance the
> PhD work of my former student, François Pessaux:
> François Pessaux and Xavier Leroy. Type-based analysis of uncaught
> exceptions. ACM Transactions on Programming Languages and Systems,
> 22(2):340-377, 2000.
> http://pauillac.inria.fr/~xleroy/publi/exceptions-toplas.ps.gz

I've just read this paper, and it looks like very promising work.  I 
wholeheartedly agree with the presentation of the issues in the 
Introduction, which makes two very important points:

(1) 'Our experience with large ML applications is that uncaught 
exceptions are the most frequent mode of failure.'

(2) 'Declaring escaping exceptions in functions and method signatures 
works well in first-order, monomorphic programs, but is not adequate for 
the kind of higher-order, polymorphic programming that ML promotes.'

(As the article points out, this problem comes up in Java as well; in an 
implementation of the Command pattern, it's difficult not to define the 
execute() method of the Command interface as being able to throw any 

The paper makes a convincing case for inference as a better approach.

Has the work described in this paper been continued?  Are there any 
plans to integrate it, or something like it, into Caml?


To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners