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 RAA28016; Wed, 30 Jul 2003 17:47:38 +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 RAA30220 for ; Wed, 30 Jul 2003 17:47:37 +0200 (MET DST) Received: from wetware.com (wetware.wetware.com [199.108.16.1]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id h6UFlZT20889 for ; Wed, 30 Jul 2003 17:47:36 +0200 (MET DST) Received: from 208.177.152.18.ptr.us.xo.net ([208.177.152.18] helo=wetware.com) by wetware.com with esmtp (Exim 4.20) id 19htAr-0003PD-V6 for caml-list@inria.fr; Wed, 30 Jul 2003 08:47:34 -0700 Date: Wed, 30 Jul 2003 08:47:33 -0700 Subject: Re: [Caml-list] assert caught by try with _ Content-Type: text/plain; charset=US-ASCII; format=flowed Mime-Version: 1.0 (Apple Message framework v552) From: james woodyatt To: The Trade Content-Transfer-Encoding: 7bit In-Reply-To: <1059560536.25904.1451.camel@dragonfly.localdomain> Message-Id: <2275AF69-C2A5-11D7-8BE5-000393BA7EBA@wetware.com> X-Mailer: Apple Mail (2.552) X-Loop: caml-list@inria.fr X-Spam: no; 0.00; woodyatt:01 jhw:01 wetware:01 caml-list:01 yaron:01 minsky:01 escapes:01 asserts:01 printf:01 stdout:01 flush:01 assert:02 exception:02 wrote:03 behavior:03 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Wednesday, Jul 30, 2003, at 03:22 US/Pacific, Yaron M. Minsky wrote: > > Not so fast. I have hit the same issue and entirely agree. In > general, > the issue of making sure that an exception escapes when you want it to > is a bit of a problem, and it would be nice to have some way of dealing > with this, and not just with asserts. But certainly asserts should > have > the option for the kind of always-die behavior you're talking about. let die_unless p s = if not p then begin Printf.printf "die: %s\n" s; flush stdout; exit (-1) end Slightly less convenient than assert, but has the effect of dying immediately. For my part, I *like* the behavior of assert and exception the way it is. -- j h woodyatt ------------------- 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