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 XAA00133; Tue, 29 Jul 2003 23:01:52 +0200 (MET DST) 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 XAA24015 for ; Tue, 29 Jul 2003 23:01:51 +0200 (MET DST) Received: from relay.pair.com (relay.pair.com [209.68.1.20]) by nez-perce.inria.fr (8.11.1/8.11.1) with SMTP id h6TL1oT18671 for ; Tue, 29 Jul 2003 23:01:50 +0200 (MET DST) Received: (qmail 44070 invoked from network); 29 Jul 2003 21:01:49 -0000 Received: from arda.pair.com (HELO checkerdell.d6.com) (209.68.1.133) by relay.pair.com with SMTP; 29 Jul 2003 21:01:49 -0000 X-pair-Authenticated: 209.68.1.133 Message-Id: <4.3.2.7.2.20030729113455.02401e98@localhost> X-Sender: checker@localhost X-Mailer: QUALCOMM Windows Eudora Version 4.3.2 Date: Tue, 29 Jul 2003 14:01:07 -0700 To: Jacques Garrigue From: Chris Hecker Subject: Re: [Caml-list] assert caught by try with _ Cc: caml-list@inria.fr In-Reply-To: <20030729121752A.garrigue@kurims.kyoto-u.ac.jp> References: <4.3.2.7.2.20030728192639.025496d8@localhost> <4.3.2.7.2.20030728112622.02f3fef8@localhost> <00d301c3553b$9c01f030$ca00a8c0@warp> <4.3.2.7.2.20030728192639.025496d8@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-Loop: caml-list@inria.fr X-Spam: no; 0.00; hecker:01 checker:01 caml-list:01 debugging:01 debugger:01 popping:01 bug:01 hard-coded:01 camlp:01 chris:01 ocaml:01 surprising:01 assert:02 compile:02 behavior:03 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk >But you might really want to catch assert failures! >For instance if you're building a debugging tool. Okay, but it seems like a compile time switch would serve both interests. Plus, it seems like the "assert should blow up" usage would be far more common, since the number of people writing non-debugging-tool code is far larger than the number writing debugging tool code. Another way of thinking about this is that almost everybody re-#defines assert in production C/C++ programs to do their own assert handling during development (whether it's printing out additional information, allowing you to drop into the debugger, popping up a message box, sending bug email, whatever). With assert hard-coded into ocaml, you can't do this. I could use a different function than assert, but then it won't compile out, etc. I could use camlp4 to make my own assert, but then I take a compilation speed hit on all my files, etc. Anyway, it sounds like this behavior isn't surprising to anybody else, so I'll add it to the list of things that only I think are broken about ocaml. :) Chris ------------------- 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