Version française
Home     About     Download     Resources     Contact us    
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: -- (:)
From: skaller <skaller@o...>
Subject: Re: [Caml-list] GC and file descriptors
On Wed, 2003-11-19 at 12:36, Martin Berger wrote:
> > 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 havn't had time to give that paper the proper read it deserves,
> but the following caught my eye:
> 
>    "to deal properly with higher-order functions, a very rich language
>     for exception declarations is required, including at least exception
>     polymorphism (variables ranging over sets of exceptions) and unions
>     of exception sets [...]. we believe that such a complex language for
>     declaring escaping exceptions is beyond what programmers are willing
>     to tolerate."
> 
> i'd be happy to have such a language available.

That is too weak. In a language like Ocaml
with separate interfaces there is no choice.
You cant infer the exceptions a function
throws from its interface, only the body.

So either you give up explicit interfaces (mli files,
signatures, etc) or you have to have an extension
to the type system terms which allows you to state the
exception spec.

A compromise might be: give up declared interfaces.
However, allow constraints to be stated on the 
infered ones. I have no idea what that would 
look like though.


-------------------
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