From: Francois Pottier <francois.pottier@inria.fr>
To: caml-list@inria.fr
Cc: William Harold Newman <william.newman@airmail.net>
Subject: Re: [Caml-list] queasiness about Exit
Date: Fri, 16 Nov 2001 09:30:34 +0100 [thread overview]
Message-ID: <20011116093034.A15619@pauillac.inria.fr> (raw)
In-Reply-To: <20011115093845.A26661@rootless>; from william.newman@airmail.net on Thu, Nov 15, 2001 at 09:38:45AM -0600
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
next prev parent reply other threads:[~2001-11-16 8:30 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-11-15 15:38 William Harold Newman
2001-11-15 16:58 ` Andreas Rossberg
2001-11-15 20:41 ` John Prevost
[not found] ` <9t0skf$d27$1@qrnik.zagroda>
2001-11-15 21:43 ` Marcin 'Qrczak' Kowalczyk
2001-11-16 8:30 ` Francois Pottier [this message]
2001-11-16 12:05 ` Lauri Alanko
2001-11-18 0:01 ` Daniel de Rauglaudre
2001-11-15 17:33 Krishnaswami, Neel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20011116093034.A15619@pauillac.inria.fr \
--to=francois.pottier@inria.fr \
--cc=caml-list@inria.fr \
--cc=william.newman@airmail.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox