From: "Daniel Bünzli" <daniel.buenzli@erratique.ch>
To: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] Static exception analysis or alternative to using exceptions
Date: Thu, 27 May 2010 11:12:19 +0200 [thread overview]
Message-ID: <AANLkTinw-Stao4jSM3eVeH2IKH-Um4pAy71xW8X2dTIc@mail.gmail.com> (raw)
In-Reply-To: <000c01cafd7a$3f6595e0$be30c1a0$@romulus.metastack.com>
> Agreed - though [find] is one of the examples where you do need find and
> find_exc - because often there are occasions where before calling
> {Map,Set,Hashtbl}.find you already know that the key exists and so won't
> fail at which point the 'a option boxing is a waste of time and space and
> Not_found would be a truly exceptional situation so passes the previously
> mentioned test.
In that case what you want is an alternate function "really_find" that
doesn't raise Not_found but Invalid_argument if the key cannot be
found.
Best,
Daniel
next prev parent reply other threads:[~2010-05-27 9:12 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-26 17:30 Dario Teixeira
2010-05-26 21:10 ` Hans Ole Rafaelsen
2010-05-27 3:37 ` Jacques Le Normand
2010-05-27 8:08 ` Florent Ouchet
2010-05-27 8:50 ` Eray Ozkural
2010-05-27 11:10 ` Florent Ouchet
2010-05-27 8:54 ` David Allsopp
2010-05-27 9:11 ` Mark Shinwell
2010-05-27 9:29 ` David Allsopp
2010-05-27 9:12 ` Daniel Bünzli [this message]
2010-05-27 9:19 ` David Allsopp
2010-05-27 9:15 ` David Rajchenbach-Teller
2010-05-27 13:56 ` Hezekiah M. Carty
-- strict thread matches above, loose matches on Subject: below --
2010-06-01 19:08 Peter Ronnquist
2010-05-26 16:15 Hans Ole Rafaelsen
2010-05-27 9:34 ` [Caml-list] " Alain Frisch
2010-05-27 17:01 ` Richard Jones
2010-05-27 21:13 ` Dario Teixeira
2010-05-31 14:36 ` Goswin von Brederlow
2010-05-31 15:00 ` Florent Ouchet
2010-05-31 17:24 ` David Allsopp
2010-05-31 20:51 ` Török Edwin
2010-06-08 9:16 ` Goswin von Brederlow
2010-05-31 19:30 ` Nicolas Pouillard
2010-05-31 20:57 ` Lukasz Stafiniak
2010-05-31 21:42 ` blue storm
2010-05-31 19:36 ` Christophe Raffalli
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=AANLkTinw-Stao4jSM3eVeH2IKH-Um4pAy71xW8X2dTIc@mail.gmail.com \
--to=daniel.buenzli@erratique.ch \
--cc=caml-list@yquem.inria.fr \
/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