Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: Francois Pottier <Francois.Pottier@inria.fr>
To: caml-list@inria.fr
Subject: Re: pourquoi y-a-t-il des exceptions?
Date: Mon, 20 Nov 2000 09:06:22 +0100	[thread overview]
Message-ID: <20001120090622.02868@pauillac.inria.fr> (raw)
In-Reply-To: <20001117181744.49309@pauillac.inria.fr>; from Xavier Leroy on Fri, Nov 17, 2000 at 06:17:44PM +0100


On Fri, Nov 17, 2000 at 06:17:44PM +0100, Xavier Leroy wrote:
>
> Cela ne poserait pas de problème au niveau du "raise", mais cela
> poserait problème pour typer le "try...with..."  ("handle" en SML).
> En effet, la valeur de l'exception rattrapée serait alors d'un type
> quelconque, inconnu statiquement, ce qui empêcherait d'en faire quoi
> que ce soit dans la partie "with" du "try...with...", en particulier
> de la filtrer.

À moins d'annoter chaque fonction par le type des exceptions
qu'elle est susceptible de renvoyer, de façon similaire à ce
qui est fait dans la thèse de François Pessaux. Cela donne un
système de types beaucoup plus fin et beaucoup plus lourd (au
moins en termes de lisibilité).

Cela dit, d'un point de vue purement opérationnel, on pourrait
très bien considérer que `raise' est applicable à une valeur
quelconque. Le seul langage répandu à avoir adopté ce point de
vue est (à ma connaissance) C++...

--
François Pottier
Francois.Pottier@inria.fr
http://pauillac.inria.fr/~fpottier/



      reply	other threads:[~2000-11-20 19:22 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-11-16 17:31 Michel Levy
2000-11-17 17:17 ` Xavier Leroy
2000-11-20  8:06   ` Francois Pottier [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=20001120090622.02868@pauillac.inria.fr \
    --to=francois.pottier@inria.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