From: Romain Bardou <romain.bardou@inria.fr>
To: Goswin von Brederlow <goswin-v-b@web.de>, caml-list@inria.fr
Subject: Re: [Caml-list] Uncaught exceptions in function type.
Date: Tue, 27 May 2014 11:38:12 +0200 [thread overview]
Message-ID: <53845D04.6000802@inria.fr> (raw)
In-Reply-To: <20140527092824.GB15848@frosties>
On 27/05/2014 11:28, Goswin von Brederlow wrote:
>
> On Mon, May 26, 2014 at 05:25:21PM +0200, Philippe Veber wrote:
>> Hi Romain!
>>
>>
>>> Some issues:
>>>
>>> - One needs to separate exceptions into two groups, the ones that you
>>> are actually interested in typing (their purpose is to kill the program,
>>> so to speak) and the ones that you are not (they are actually used for
>>> control flow).
>>>
>> I would not like such a separation, unless the user can decide the kind of
>> each exception (did you say burdensome? ;o). This kind of separation is
>> pretty much the reason why there are errors and exceptions in Java, IIRC.
>
> An exception that is used for control flow will be thrown and quickly
> caught. It would not appear in a functions signature if the control
> flow is done right. But if you made a mistake and didn't catch it then
> it should appear in the signature and give you cause to recheck your
> code.
>
> I would say that exceptions used for control flow are exactly the
> ones that you want typed.
>
> On the other hand exceptions that kill the programm, like out of
> memory, would be completly useless to type. Basically anything can
> throw out of memory and nobody can catch it. It would simply appear in
> every single (non trivial) function and annoy the programmer.
Right sorry I was apparently not typing what was actually in my head :D
--
Romain
next prev parent reply other threads:[~2014-05-27 9:37 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-26 14:23 Philippe Veber
2014-05-26 14:56 ` Romain Bardou
2014-05-26 15:13 ` Ben Millwood
2014-05-26 16:02 ` Philippe Veber
2014-05-26 16:34 ` Daniel Bünzli
2014-05-27 6:52 ` Philippe Veber
2014-05-27 8:42 ` Ben Millwood
2014-05-27 10:05 ` Goswin von Brederlow
2014-05-27 10:36 ` Ben Millwood
2014-05-27 11:24 ` Yaron Minsky
2014-05-27 21:42 ` Daniel Bünzli
2014-05-27 21:16 ` Daniel Bünzli
2014-06-02 8:38 ` Goswin von Brederlow
2014-05-27 8:49 ` Goswin von Brederlow
2014-05-27 8:56 ` David House
2014-05-27 21:39 ` Daniel Bünzli
2014-06-02 8:31 ` Goswin von Brederlow
2014-05-27 9:25 ` Nicolas Boulay
2014-05-27 21:51 ` Daniel Bünzli
2014-05-30 18:03 ` Florian Weimer
2014-05-31 11:26 ` Daniel Bünzli
2014-06-02 8:43 ` Goswin von Brederlow
2014-05-26 15:25 ` Philippe Veber
2014-05-27 9:28 ` Goswin von Brederlow
2014-05-27 9:38 ` Romain Bardou [this message]
2014-05-26 15:33 ` Thomas Blanc
2014-05-26 16:04 ` Philippe Veber
2014-05-26 15:33 ` Gabriel Scherer
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=53845D04.6000802@inria.fr \
--to=romain.bardou@inria.fr \
--cc=caml-list@inria.fr \
--cc=goswin-v-b@web.de \
/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