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 VAA31488; Wed, 12 Mar 2003 21:39:30 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id VAA31646 for ; Wed, 12 Mar 2003 21:39:29 +0100 (MET) Received: from epexch01.qlogic.org ([63.170.40.3]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id h2CKdSX04627 for ; Wed, 12 Mar 2003 21:39:28 +0100 (MET) Received: from epmailtmp.qlogic.org ([10.20.33.254]) by epexch01.qlogic.org with Microsoft SMTPSVC(5.0.2195.5329); Wed, 12 Mar 2003 14:40:57 -0600 Received: from [10.20.33.146] ([10.20.33.146]) by epmailtmp.qlogic.org with Microsoft SMTPSVC(5.0.2195.4905); Wed, 12 Mar 2003 14:40:57 -0600 Date: Wed, 12 Mar 2003 14:49:57 -0600 (CST) From: Brian Hurt X-X-Sender: Reply-To: Brian Hurt To: "Richard W.M. Jones" cc: Ocaml Mailing List Subject: Re: [Caml-list] Checked exceptions and type inference In-Reply-To: <20030312172011.GB11435@redhat.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-OriginalArrivalTime: 12 Mar 2003 20:40:57.0210 (UTC) FILETIME=[AF0A5DA0:01C2E8D7] X-Spam: no; 0.00; qlogic:01 caml-list:01 inference:01 0600,:01 nuisance:01 workings:01 atom:01 ocaml:01 wrote:03 object:03 trick:03 exceptions:04 modes:05 probably:05 derived:05 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Wed, 12 Mar 2003, Richard W.M. Jones wrote: > On Tue, Mar 11, 2003 at 03:50:13PM -0600, Brian Hurt wrote: > > Is there any research on using checked exceptions in an ML derived > > language? Any plans/opinions on implementing checked exceptions in Ocaml? > > Please no. I'm not sure where I sit in this debate. On one hand, if you view exceptions as 'error returns' (End of File, etc), then checked exceptions make sense. Some errors need to be handled. And handling them should be required. On the other hand, if you view exceptions as 'probably fatal exceptional conditions' (Out of Memory, etc), then having to deal with them is simply a nuisance. What else can you do except print out an error message, clean up, and exit? Now, for the trick question: is Not_found an error return, or a probably fatal exceptional condition? And yes, I've had fun with Java exceptions as well, which is the only reason I'm wimbling. And failure modes do expose the internal workings of an object (or a function, or whatever atom of generalization you are using). Brian ------------------- 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