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 VAA18097; Mon, 28 Jul 2003 21:08:22 +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 VAA21766 for ; Mon, 28 Jul 2003 21:08:21 +0200 (MET DST) Received: from mwinf0602.wanadoo.fr (smtp3.wanadoo.fr [193.252.22.25]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id h6SJ8Kf11321 for ; Mon, 28 Jul 2003 21:08:20 +0200 (MET DST) Received: from warp (ABordeaux-103-1-11-130.w80-13.abo.wanadoo.fr [80.13.176.130]) by mwinf0602.wanadoo.fr (SMTP Server) with SMTP id 6DB345400294; Mon, 28 Jul 2003 21:08:16 +0200 (CEST) Message-ID: <00d301c3553b$9c01f030$ca00a8c0@warp> From: "Nicolas Cannasse" To: , "Chris Hecker" References: <4.3.2.7.2.20030728112622.02f3fef8@localhost> Subject: Re: [Caml-list] assert caught by try with _ Date: Mon, 28 Jul 2003 21:08:11 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 X-Loop: caml-list@inria.fr X-Spam: no; 0.00; cannasse:01 warplayer:01 caml-list:01 asserts:01 silently:01 ocaml:01 nicolas:01 workaround:01 handler:01 assert:02 overflow:02 catching:02 exception:02 stack:02 exceptions:04 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk > Is the the "right thing" for assert to be caught by a try ... with _ -> ... > block? In other words, it seems like you want an assert to always blow up > if asserts are turned on, not to fail silently when there's a try block > somewhere higher up in the program. Maybe it should be an option to have > it fail immediately regardless of whether there's an exception handler > around it? The problem is that the workaround is to muck with every "with" > expression to ensure you don't accidentally catch an assert, which is a > huge pain and error prone, so it seems easier to have an option to just > blow up. The rationale is that asserts are meta, not part of the main > program's flow. You could tell the same for stack overflow and some other kinds of exceptions. OCaml uniformly treat failures as exceptions, and that's the right thing to do. But catching exceptions with _ , without even printing them, is not the "right thing" and is definitly huge pain and error prone. Nicolas Cannasse ------------------- 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