From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=AWL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from discorde.inria.fr (discorde.inria.fr [192.93.2.38]) by yquem.inria.fr (Postfix) with ESMTP id CF17ABC0A for ; Sun, 10 Dec 2006 07:34:43 +0100 (CET) Received: from pih-relay06.plus.net (pih-relay06.plus.net [212.159.14.133]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id kBA6YhZD029758 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NO) for ; Sun, 10 Dec 2006 07:34:43 +0100 Received: from [80.229.56.224] (helo=[10.0.0.5]) by pih-relay06.plus.net with esmtp (Exim) id 1GtIGo-0007Ga-SE for caml-list@yquem.inria.fr; Sun, 10 Dec 2006 06:34:43 +0000 From: Jon Harrop Organization: Flying Frog Consultancy Ltd. To: caml-list@yquem.inria.fr Subject: Re: [Caml-list] Today's inflamatory opinion: exceptions are bad Date: Sun, 10 Dec 2006 06:32:01 +0000 User-Agent: KMail/1.9.5 References: <875c7e070612091935q2388092dr51538ff444d0e3a6@mail.gmail.com> In-Reply-To: <875c7e070612091935q2388092dr51538ff444d0e3a6@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200612100632.02292.jon@ffconsultancy.com> X-Miltered: at discorde with ID 457BAA83.001 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; ocaml:01 o'caml:01 whereby:01 compiler:01 ocamlexc:01 ocamlexc:01 ocaml:01 frog:98 wrote:01 imho:01 exception:01 caml-list:01 exceptions:01 exceptions:01 caml:02 On Sunday 10 December 2006 03:35, Chris King wrote: > > My point here is this: Ocaml is not Java (a fact we should all be > > gratefull for, IMHO). Simply because Java and C++ do something, doesn't > > mean that it's a good thing to do. > > 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 -- Dr Jon D Harrop, Flying Frog Consultancy Ltd. Objective CAML for Scientists http://www.ffconsultancy.com/products/ocaml_for_scientists