caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: "Haoyang Wang" <hywang@pobox.com>
To: "Jean-Christophe Filliatre" <filliatr@lri.fr>
Cc: caml-list <caml-list@inria.fr>
Subject: Re: [Caml-list] Today's inflamatory opinion: exceptions are bad
Date: Sun, 10 Dec 2006 11:15:28 -0800	[thread overview]
Message-ID: <e3e02b3f0612101115h3da8d361y75ba8ba8a3f56998@mail.gmail.com> (raw)
In-Reply-To: <17788.2858.414320.138285@serveur9-10.lri.fr>

> And regarding exceptions specifically, another of their rules is
> this one:
>
>   # Use exceptions only for exceptional situations.

For example, when List.find fails to find the item in the list? ;-)
Boxing the result in an option type produces more garbage.

With automatic memory management, there is less need to clean up after
an exception. Thus exceptions can be used quite freely in both Erlang
and o'caml.

ML was designed for theorem provers, and many of its features can be
traced back to that specific purpose. I read somewhere that exception
was introduced in ML for back-tracking, which occurs frequently during
the normal course of trying out various tactics to prove a theorem.

Even today, exceptions are used heavily in coq. Could you comment on
your experiences with the usage of caml exceptions in coq? Are
exceptions raised there "only for exceptional situations"?

Thanks,

Haoyang Wang


  reply	other threads:[~2006-12-10 19:15 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-10  1:42 Brian Hurt
2006-12-10  2:40 ` [Caml-list] " skaller
2006-12-10  2:51 ` Martin Jambon
2006-12-10  3:35 ` Chris King
2006-12-10  6:32   ` Jon Harrop
2006-12-10 19:07     ` brogoff
2006-12-10 18:04   ` Richard Jones
2006-12-10 23:27     ` Chris King
2006-12-11 15:55       ` Richard Jones
2006-12-15 11:13         ` Frédéric Gava
2006-12-11 17:28     ` Mike Lin
2006-12-11 20:09       ` Richard Jones
2006-12-11 23:38   ` Olivier Andrieu
     [not found]   ` <C841DA73-83D4-4CDD-BF4A-EA803C6D6A08@vub.ac.be>
2006-12-23  4:23     ` Ocaml checked exceptions Chris King
2006-12-10  6:30 ` [Caml-list] Today's inflamatory opinion: exceptions are bad malc
2006-12-10  6:36   ` malc
2006-12-10  6:56 ` Jon Harrop
2006-12-10  9:51 ` Andreas Rossberg
2006-12-10 11:00   ` Tom
2006-12-10 11:25     ` Andreas Rossberg
2006-12-10 13:27   ` Jean-Christophe Filliatre
2006-12-10 19:15     ` Haoyang Wang [this message]
2006-12-10 21:43       ` Jean-Christophe Filliatre
2006-12-11 13:10       ` Diego Olivier FERNANDEZ PONS
2006-12-10 18:31   ` Serge Aleynikov

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=e3e02b3f0612101115h3da8d361y75ba8ba8a3f56998@mail.gmail.com \
    --to=hywang@pobox.com \
    --cc=caml-list@inria.fr \
    --cc=filliatr@lri.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;
as well as URLs for NNTP newsgroup(s).