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 QAA07485; Sat, 17 Jul 2004 16:24:50 +0200 (MET DST) 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 QAA05358 for ; Sat, 17 Jul 2004 16:24:48 +0200 (MET DST) X-SPAM-Warning: Sending machine is listed in blackholes.five-ten-sg.com Received: from mwinf0204.wanadoo.fr (smtp2.wanadoo.fr [193.252.22.29]) by concorde.inria.fr (8.12.10/8.12.10) with ESMTP id i6HEOlSH010728 for ; Sat, 17 Jul 2004 16:24:47 +0200 Received: from morgana (ARennes-303-1-18-119.w81-51.abo.wanadoo.fr [81.51.59.119]) by mwinf0204.wanadoo.fr (SMTP Server) with ESMTP id 85618A0000B7; Sat, 17 Jul 2004 16:24:47 +0200 (CEST) Received: from david by morgana with local (Exim 4.32) id 1Blq7I-0000Uk-E6; Sat, 17 Jul 2004 16:24:44 +0200 To: John Prevost Cc: caml-list@inria.fr Subject: Re: [Caml-list] assertions or exceptions? References: <7f8e92aa04071501035091cbe9@mail.gmail.com> <20040715101826.GA10062@redhat.com> <7f8e92aa04071505495315454@mail.gmail.com> <20040715133359.GA13273@redhat.com> <7f8e92aa040715065823a44bdf@mail.gmail.com> <40F82445.3070307@cs.caltech.edu> From: David MENTRE Organization: none Date: Sat, 17 Jul 2004 16:24:43 +0200 In-Reply-To: (John Prevost's message of "Fri, 16 Jul 2004 22:55:45 -0400") Message-ID: <87y8lir9sk.fsf@linux-france.org> User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Miltered: at concorde with ID 40F936AF.001 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 dmentre:01 prevost:01 prevost:01 hashtbl:01 dmentre:01 ocaml:01 assertions:01 raises:01 writes:01 mentre:01 mentre:01 behavior:03 exceptions:04 structure:06 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk John Prevost writes: > An example of one place in the OCaml standard libraries where I get > irked is with various container data-structures where searching for an > item raises "Not_found" when the item is not in the structure. From > my point of view, not finding something is very much expected > behavior. Please notice that in that very specific case you have the "mem" function (e.g. Hashtbl.mem) that gives you the opportunity to check for the element if you expect it missing. Yours, d. -- David Mentré ------------------- 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