Browse thread
[Caml-announce] coca-ml (downcast of objects)
- Emmanuel.Chailloux@p...
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: | 2001-09-25 (16:01) |
From: | Emmanuel.Chailloux@p... |
Subject: | [Caml-announce] coca-ml (downcast of objects) |
[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...