From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id PAA16813; Wed, 19 Nov 2003 15:34:17 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id PAA17468 for ; Wed, 19 Nov 2003 15:34:15 +0100 (MET) Received: from mail2.tpgi.com.au (mail.tpgi.com.au [203.12.160.58]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id hAJEYD121792 for ; Wed, 19 Nov 2003 15:34:13 +0100 (MET) Received: from 203-213-84-84-syd-ts16-2600.tpgi.com.au (203-213-84-84-syd-ts16-2600.tpgi.com.au [203.213.84.84]) by mail2.tpgi.com.au (8.12.10/8.12.10) with ESMTP id hAJEY3pi026665; Thu, 20 Nov 2003 01:34:04 +1100 Subject: Re: [Caml-list] GC and file descriptors From: skaller Reply-To: skaller@ozemail.com.au To: Martin Berger Cc: Caml Mailing List In-Reply-To: <3FBAC938.8080309@dcs.qmul.ac.uk> References: <1069168323.18363.83.camel@pelican> <3FBA4D97.9060309@dcs.qmul.ac.uk> <3FBA6459.3000000@socialtools.net> <20031118202438.A9506@pauillac.inria.fr> <3FBAC938.8080309@dcs.qmul.ac.uk> Content-Type: text/plain; charset=UTF-8 Message-Id: <1069248814.23700.81.camel@pelican> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 (1.2.2-4) Date: 20 Nov 2003 00:33:34 +1100 Content-Transfer-Encoding: 8bit X-Kaspersky-Antivirus: Passed X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 ozemail:01 pessaux:01 type-based:01 publi:01 havn't:01 higher-order:01 unions:01 tolerate:01 infer:01 mli:01 ocaml:01 descriptors:01 interfaces:01 interfaces:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk 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