From: Emmanuel.Chailloux@pps.jussieu.fr
To: caml-announce@inria.fr
Subject: [Caml-announce] coca-ml (downcast of objects)
Date: Mon, 24 Sep 2001 22:29:22 +0200 [thread overview]
Message-ID: <200109242026.f8OKQtc24770@foobar.pps.jussieu.fr> (raw)
[la version francaise suit]
hello,
I have made a small extension to ocaml 3-02 called coca-ml and using
camlp4
to allow "down cast" of objects between classes in relations of
inheritence
and sub-typing.
This extension introduces two new syntatic constructions :
expr instanceof c : is used to test if an object "is-a" element
of c
or a derived
class of c
and returns a boolean.
cast expr from c1 to c2 : is used to cast an object to the type c2 :
type of expr must be equal to c1
c2 must be a sub-type of c1
expr "is-a" c2
There is a dynamic test to check if expr "is-a" c2. If not a
exception
is raised.
coca-ml home page is :
http://www.pps.jussieu.fr/~emmanuel/Public/Dev/coca-ml/index-en.html
Please send the bug reports
or your remarks to Emmanuel.Chailloux@pps.jussieu.fr
Emmanuel Chailloux...
[
Salut,
J'ai fait une petite extension d'ocaml 3-02 appelee coca-ml et
utilisant
camlp4 pour autoriser le "down cast" d'objets.
Cette extension introduit deux nouvelles constructions syntaxiques :
expr instanceof c : est utilisee pour tester si un objet "est-un"
element de c ou d'une classe derivee de c,
et retourn un booleen.
cast expr from c1 to c2 : est utilisee pour contraindre le type
d'un objet
vers c2 :
le type de expr doit etre zgal au type
de c1
c2 doit etre un sous-type de c1
expr "est-un" c2
Il y a un test dynamique pour verifier que expr "est-un" c2. Si ce
n'est
pas le cas une exception est declenchee.
la page web de coca-ml est :
http://www.pps.jussieu.fr/~emmanuel/Public/Dev/coca-ml/index.html
Veuillez envoyer vos rapports d'anomalies
ou vos remarques a' Emmanuel.Chailloux@pps.jussieu.fr
Emmanuel Chailloux...
reply other threads:[~2001-09-25 16:01 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=200109242026.f8OKQtc24770@foobar.pps.jussieu.fr \
--to=emmanuel.chailloux@pps.jussieu.fr \
--cc=caml-announce@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