caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: David Teller <David.Teller@univ-orleans.fr>
To: yminsky@gmail.com
Cc: OCaml <caml-list@inria.fr>
Subject: Re: [Caml-list] [OSR] Exceptionless error management, take 2
Date: Mon, 11 Feb 2008 13:53:29 +0100	[thread overview]
Message-ID: <1202734409.6348.60.camel@Blefuscu> (raw)
In-Reply-To: <891bd3390802110412p4de4cba0me596640e55c6b994@mail.gmail.com>

I'm not sure where you see approach 2. 

My suggestion deals with approach 1, while Daniel's is approach 3. The
point of monads is not related to converting exceptions, but rather to
being able to compose functions without having to add a manual check at
each step. And the point of this "optimized" monad implementation is
just to make that faster.

If the confusion is caused by my answer to your previous post, I just
realized that my fixing your "bind" was a mistake. Please accept my
apologies, I misread what you had written.

Now, if this candidate is too confusing -- which I can't judge, as I
wrote it -- perhaps something less confusing would be more appropriate. 

Cheers,
 David

On Mon, 2008-02-11 at 07:12 -0500, Yaron Minsky wrote:
> Something about this whole error-handling proposal confuses me.
> Here's my concern: I can see 3 approaches, all having to do with what
> goes in the 'b slot in the ('a,'b) status type:
>      1. Use different, wholly incompatible types in 'b.  This allows
>         you to put useful information into the signature of each
>         error-producing function, but basically requires individual
>         handling of each error.  No monadic magic and no conversion to
>         exceptions is possible, and each error must be handled
>         individually.  It's more explicit and more verbose.
>      2. Use the same type in 'b everywhere.  There's no extra
>         explicitness here, and I don't actually see any advantage over
>         just using exceptions.
>      3. Use different but compatible types, e.g., polymorphic
>         variants.  Then you get both explicitness and the chance to
>         use monadic or other tricks to join together the errors at the
>         type level.  That has some clear advantages (the type system
>         can infer for you the ser of all possible error messages), but
>         we've found it leads to some sticky type error messages in
>         some cases.
> So, I understand why someone would try (1) or (3), but (2) seems
> utterly pointless to me.  The proposal seems to be aiming at (1), but
> then there's all this talk of monads which doesn't seem to fit (1).
> 
> Am I missing something?
> 
> y
-- 
David Teller
 Security of Distributed Systems
  http://www.univ-orleans.fr/lifo/Members/David.Teller
 Angry researcher: French Universities need reforms, but the LRU act brings liquidations. 


  reply	other threads:[~2008-02-11 12:53 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-07 15:01 David Teller
2008-02-07 15:09 ` [Caml-list] " Vincent Hanquez
2008-02-07 16:40   ` David Teller
2008-02-07 15:17 ` Jacques Garrigue
2008-02-07 15:22   ` Jon Harrop
2008-02-08  9:54     ` Vincent Hanquez
2008-02-07 15:52   ` David Teller
2008-02-07 16:06     ` Olivier Andrieu
2008-02-07 16:23       ` David Teller
2008-02-08  9:53   ` Vincent Hanquez
2008-02-08 10:52     ` rlehy
2008-02-08 11:56       ` Vincent Hanquez
2008-02-08 12:40         ` Bünzli Daniel
2008-02-08 15:39           ` David Teller
2008-02-08 17:06             ` Eric Cooper
2008-02-08 20:02               ` David Teller
2008-02-08 19:29             ` Bünzli Daniel
2008-02-08 21:13               ` David Teller
2008-02-10 12:35           ` Vincent Hanquez
2008-02-08 19:07     ` Jon Harrop
2008-02-10 11:58       ` Vincent Hanquez
2008-02-10 16:51       ` Matthew William Cox
2008-02-07 15:33 ` Jon Harrop
2008-02-07 16:25   ` David Teller
2008-02-07 23:10 ` David Teller
2008-02-10 18:47 ` Yaron Minsky
2008-02-10 22:05   ` David Teller
2008-02-11  2:16     ` Yaron Minsky
2008-02-11  8:45       ` David Teller
2008-02-11 12:12         ` Yaron Minsky
2008-02-11 12:53           ` David Teller [this message]
2008-02-11 23:09             ` Yaron Minsky

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=1202734409.6348.60.camel@Blefuscu \
    --to=david.teller@univ-orleans.fr \
    --cc=caml-list@inria.fr \
    --cc=yminsky@gmail.com \
    /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).