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 JAA15805; Fri, 16 Nov 2001 09:30:37 +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 JAA15304 for ; Fri, 16 Nov 2001 09:30:36 +0100 (MET) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by concorde.inria.fr (8.11.1/8.10.0) with ESMTP id fAG8UYv28898; Fri, 16 Nov 2001 09:30:34 +0100 (MET) Received: (from fpottier@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id JAA16145; Fri, 16 Nov 2001 09:30:34 +0100 (MET) Date: Fri, 16 Nov 2001 09:30:34 +0100 From: Francois Pottier To: caml-list@inria.fr Cc: William Harold Newman Subject: Re: [Caml-list] queasiness about Exit Message-ID: <20011116093034.A15619@pauillac.inria.fr> Reply-To: Francois.Pottier@inria.fr References: <20011115093845.A26661@rootless> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Mailer: Mutt 1.0i In-Reply-To: <20011115093845.A26661@rootless>; from william.newman@airmail.net on Thu, Nov 15, 2001 at 09:38:45AM -0600 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Hi, > But I'm having trouble convincing myself that this won't get me into > trouble with obscure bugs later as things get complicated and > "predicate" or "map_for_effect_on_complex_data_structure" might themselves > be implemented in terms of "try .. raise Exit .. with Exit -> .." > constructs. Indeed, if you use the same exception `Exit' throughout all of your code, then you might get into this kind of trouble. I'd suggest using a different exception every time you need one, to avoid the risk of accidental capture. A module can declare an arbitrary number of exceptions for internal use; you can even generate new exceptions dynamically (using local modules, introduced by `let module') if needed (although that's pretty rare). -- François Pottier Francois.Pottier@inria.fr http://pauillac.inria.fr/~fpottier/ ------------------- Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr