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 EAA03663; Wed, 12 Mar 2003 04:01:08 +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 EAA03204 for ; Wed, 12 Mar 2003 04:01:06 +0100 (MET) Received: from imo-r01.mx.aol.com (imo-r01.mx.aol.com [152.163.225.97]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id h2C315f27666 for ; Wed, 12 Mar 2003 04:01:05 +0100 (MET) Received: from artboreb@netscape.net by imo-r01.mx.aol.com (mail_out_v34.21.) id g.f0.7b25ba6 (16238) for ; Tue, 11 Mar 2003 22:00:49 -0500 (EST) Received: from netscape.net (mow-d13.webmail.aol.com [205.188.139.129]) by air-in03.mx.aol.com (v90_r2.5) with ESMTP id MAILININ32-0311220049; Tue, 11 Mar 2003 22:00:49 -0500 Date: Tue, 11 Mar 2003 22:00:48 -0500 From: artboreb@netscape.net (Arturo Borquez) To: caml-list@inria.fr Subject: RE: [Caml-list] Checked exceptions and type inference MIME-Version: 1.0 Message-ID: <46D5FE1E.20DB90B0.00958B05@netscape.net> X-Mailer: Atlas Mailer 2.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Spam: no; 0.00; caml-list:01 inference:01 qlogic:01 ltu:99 unexpected:01 adp:99 promos:99 ocaml:01 caml:01 surprising:01 failing:02 string:03 wrote:03 let:04 exceptions:04 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Brian Hurt wrote: > >Reading LtU I came across this article: >http://www.octopull.demon.co.uk/java/ExceptionalJava.html > >Java treats checked exceptions as part of the type signature of the >function. As such, it seems to me that as such, type inference would work >to propogate most of this information in a more convient way. > >>From the manual: Caml provides exceptions for signalling and handling exceptional conditions. ... These 'exceptional conditions' do not implies an 'error' at all, so it might be. Moreover exceptions may have a type within the context where they occurr. ie: let x = try String.sub str pos len with _ -> "" in .... in this case failing String.sub is returning a string, and the type inference system will check it that way. Perhaps I don't understand what migth be a 'checked exception' in ML. I am missing something?. can you explain it with an example? >Checked exceptions actually have their uses, for "errors" which are not >very exceptional. Out of memory is highly unexpected. End of file isn't >quite as surprising. Not_found is another that shouldn't be that >surprising- although that leads to a different religous war. > >Is there any research on using checked exceptions in an ML derived >language? Any plans/opinions on implementing checked exceptions in Ocaml? > Regards. -- Arturo Borquez __________________________________________________________________ Try AOL and get 1045 hours FREE for 45 days! http://free.aol.com/tryaolfree/index.adp?375380 Get AOL Instant Messenger 5.1 for FREE! Download Now! http://aim.aol.com/aimnew/Aim/register.adp?promos=380455 ------------------- 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