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 TAA30147; Tue, 1 May 2001 19:21:16 +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 TAA30399 for ; Tue, 1 May 2001 19:21:15 +0200 (MET DST) Received: from mrwall.kal.com (mrwall.kal.com [194.193.14.236]) by nez-perce.inria.fr (8.11.1/8.10.0) with SMTP id f41HLF924620 for ; Tue, 1 May 2001 19:21:15 +0200 (MET DST) Received: from mrwall.kal.com [194.193.14.236] (HELO localhost) by mrwall.kal.com (AltaVista Mail V2.0J/2.0J BL25J listener) id 0000_0045_3aee_f147_5b0a; Tue, 01 May 2001 18:24:23 +0100 Received: from somewhere by smtpxd Message-ID: <3145774E67D8D111BE6E00C0DF418B66427149@nt.kal.com> From: Dave Berry To: Jacques Garrigue , bpr@best.com Cc: caml-list@inria.fr Subject: RE: [Caml-list] two unrelated questions Date: Tue, 1 May 2001 18:25:54 +0100 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.0.1460.8) Content-Type: text/plain; charset="iso-8859-1" Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Even a top level exception can escape its scope, e.g. if a signature doesn't include an exception raised by one of the functions in the signature. The problem I (as an SMLer) cite most often is exceptions - not just local exceptions - escaping their scope. Having said that, I think it best to have two distinct features: exceptions and breaks. Exceptions are top-level, monomorphic, and comparatively easy to track. Breaks are declared in function bodies, potentially polymorphic, and should be banned from exiting the scope of their declaration. This would entail limits on how breaks could be used, to make the flow control tractable. I don't know whether there is a suitable flow control algorithm that would give reasonable flexibility while still ensuring this safety requirement. -----Original Message----- From: Jacques Garrigue [mailto:garrigue@kurims.kyoto-u.ac.jp] Sent: Tuesday, May 01, 2001 2:31 To: bpr@best.com Cc: caml-list@inria.fr Subject: Re: [Caml-list] two unrelated questions That is, defining local exceptions (and local types also) is a very fine way to shoot oneself in the foot. You end up having plenty of exceptions (or types) with the same name (impossible to distinguish at toplevel), but incompatible. For exceptions, logically a locally defined exception escaping its scope should be a fatal error, but this is not the case (cannot be really enforced). So you can end up at toplevel getting an exception of an unknown name, impossible to catch. (This is the problem SMLers cite most often). ------------------- To unsubscribe, mail caml-list-request@inria.fr. Archives: http://caml.inria.fr