From: Yaron Minsky <yminsky@gmail.com>
To: David Teller <David.Teller@univ-orleans.fr>
Cc: OCaml <caml-list@inria.fr>
Subject: Re: [Caml-list] [OSR] Exceptionless error management, take 2
Date: Mon, 11 Feb 2008 18:09:15 -0500 [thread overview]
Message-ID: <886690B3-6EC1-44E5-8ABD-23A72489831C@gmail.com> (raw)
In-Reply-To: <1202734409.6348.60.camel@Blefuscu>
On Feb 11, 2008, at 7:53 AM, David Teller <David.Teller@univ-
orleans.fr> wrote:
> I'm not sure where you see approach 2.
I'm probably the one being confusing here. My only point is: the
monadic interface seems unlikely to work well, and so it seems to me
like a bad idea to make compromises to the simplicity and terseness of
the approach for the potential of making an efficient monadic
implementation later.
In short, I would use the status type directly and eliminate the
may_fail
Y
> 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.
>
prev parent reply other threads:[~2008-02-12 0:29 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
2008-02-11 23:09 ` Yaron Minsky [this message]
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=886690B3-6EC1-44E5-8ABD-23A72489831C@gmail.com \
--to=yminsky@gmail.com \
--cc=David.Teller@univ-orleans.fr \
--cc=caml-list@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