From: David Monniaux <David.Monniaux@ens-lyon.fr>
To: Pascal Zimmer <Pascal.Zimmer@ens-lyon.fr>
Cc: caml-list@inria.fr
Subject: Re: Exceptions polymorphes
Date: Tue, 18 Nov 1997 16:12:25 +0100 (MET) [thread overview]
Message-ID: <Pine.GSO.3.95.971118160740.29849C-100000@gerland> (raw)
In-Reply-To: <199711181357.OAA02954@dragon.ens-lyon.fr>
[ Why exceptions can't be polymorphic... ]
On Tue, 18 Nov 1997, Pascal Zimmer wrote:
> Comme les exceptions exn sont un type comme un autre, je ne vois pas de
> raison theorique empechant ce genre de declaration.
Quelle serait dans ce cas la semantique de:
exception Found of 'a;;
try
raise (Found 1)
with
Found x -> print_string;;
Pour que cela reste type-safe, il faudrait que l'on teste si les parties
polymorphes de l'exception renvoyee sont bien compatibles avec les
contraintes de types des variables du pattern-matching.
Cela revient a implementer un peu de la surcharge dynamique.
(Sauf erreur de ma part a faire reparer par les experts.)
next prev parent reply other threads:[~1997-11-19 8:02 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
1997-11-18 13:57 Pascal Zimmer
1997-11-18 15:12 ` David Monniaux [this message]
1997-11-18 17:59 ` Christophe Raffalli
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=Pine.GSO.3.95.971118160740.29849C-100000@gerland \
--to=david.monniaux@ens-lyon.fr \
--cc=Pascal.Zimmer@ens-lyon.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