caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: "Yaron Minsky" <yminsky@gmail.com>
To: "David Teller" <David.Teller@univ-orleans.fr>
Cc: "Bünzli Daniel" <daniel.buenzli@erratique.ch>,
	"caml-list List" <caml-list@inria.fr>
Subject: Re: [Caml-list] [OSR] Exceptionless error management
Date: Fri, 1 Feb 2008 07:19:13 -0500	[thread overview]
Message-ID: <891bd3390802010419t333d3a33n719de5fc56e3e097@mail.gmail.com> (raw)
In-Reply-To: <1201854718.6516.4.camel@Blefuscu>

[-- Attachment #1: Type: text/plain, Size: 1465 bytes --]

We've come to be pretty leery of exceptions at Jane Street, and we've had
some experience trying to control their use  Some quick observations on the
current proposal:

   1. Banning exceptions outright seems too strict.  Our tendency has
   been to have two versions of the function, e.g., Map.find and
   Map.find_exn.  (Our previous approach would have been to use
   Map.find_opt for the one that returns and option and Map.find for the
   exception-throwing one, but we're slowly migrating to the first proposal.)
   The goal is to make the user aware that an exception is reasonably likely,
   rather than ban exceptions.
   2. We've played around with monadic error systems that combine errors
   into a big polymorphic variant.  The key practical problem we hit were
   obscenely complicated error messages.  Still, in some cases, monads are very
   nice.
   3. Having a variant type other than option so you can specify various
   different errors (ours is Ok of 'a | Error of 'b) is a good idea.  And I
   think it's common enough that you should define it in your core library as
   an ordinary variant and make it available everywhere.

y


>
> _______________________________________________
> Caml-list mailing list. Subscription management:
> http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
> Archives: http://caml.inria.fr
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> Bug reports: http://caml.inria.fr/bin/caml-bugs
>

[-- Attachment #2: Type: text/html, Size: 2073 bytes --]

  reply	other threads:[~2008-02-01 12:19 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-31  8:55 Bünzli Daniel
2008-01-31  9:57 ` [Caml-list] " Till Varoquaux
2008-01-31 11:01   ` Bünzli Daniel
2008-01-31 14:09     ` Andrej Bauer
2008-01-31 14:16       ` Michael Ekstrand
2008-01-31 19:28         ` David Teller
2008-01-31 19:59           ` Michael Ekstrand
2008-01-31 20:05           ` blue storm
2008-01-31 20:03       ` Bünzli Daniel
2008-01-31 20:25         ` David Teller
2008-01-31 20:40           ` David Teller
2008-01-31 21:16           ` Bünzli Daniel
2008-01-31 21:31             ` David Teller
2008-01-31 21:35           ` Jon Harrop
2008-01-31 22:01           ` Christophe Raffalli
2008-02-01  7:27         ` Michaël Grünewald
2008-02-01  7:47           ` Bünzli Daniel
2008-02-01 10:50             ` Till Varoquaux
2008-02-01 11:31               ` Bünzli Daniel
2008-02-01 15:59                 ` Vincent Hanquez
2008-02-01 18:37                   ` Bünzli Daniel
2008-02-01 19:43                     ` Vincent Hanquez
2008-02-01 16:04                 ` David Allsopp
2008-02-01  8:31 ` David Teller
2008-02-01 12:19   ` Yaron Minsky [this message]
2008-02-05 10:00 ` David Teller
2008-02-05 10:12   ` Vincent Hanquez
2008-02-05 10:26     ` Bünzli Daniel
2008-02-05 11:06       ` Vincent Hanquez
2008-02-05 13:46         ` Jon Harrop
2008-02-05 11:36       ` Frédéric van der Plancke
2008-02-06  8:45       ` Michaël Grünewald
2008-02-08 13:09         ` Bünzli Daniel
2008-02-05 14:12     ` David Teller
2008-02-11  8:12 ` David Teller
2008-02-11  9:09   ` Bünzli Daniel

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=891bd3390802010419t333d3a33n719de5fc56e3e097@mail.gmail.com \
    --to=yminsky@gmail.com \
    --cc=David.Teller@univ-orleans.fr \
    --cc=caml-list@inria.fr \
    --cc=daniel.buenzli@erratique.ch \
    /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;
as well as URLs for NNTP newsgroup(s).