From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id SAA16281; Tue, 25 Sep 2001 18:01:55 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-announce@pauillac.inria.fr using -f Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id SAA16273 for caml-announce@pauillac.inria.fr; Tue, 25 Sep 2001 18:01:55 +0200 (MET DST) Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id WAA14185 for ; Mon, 24 Sep 2001 22:23:20 +0200 (MET DST) From: Emmanuel.Chailloux@pps.jussieu.fr Received: from shiva.jussieu.fr (shiva.jussieu.fr [134.157.0.129]) by nez-perce.inria.fr (8.11.1/8.10.0) with ESMTP id f8OKNIX29785 for ; Mon, 24 Sep 2001 22:23:18 +0200 (MET DST) Received: from foobar.pps.jussieu.fr (IDENT:root@foobar.pps.jussieu.fr [134.157.168.2]) by shiva.jussieu.fr (8.11.3/jtpda-5.3.3) with ESMTP id f8OKNIP14345 for ; Mon, 24 Sep 2001 22:23:18 +0200 (CEST) Received: from chrome (chrome.pps.jussieu.fr [134.157.168.24]) by foobar.pps.jussieu.fr (8.11.0/jtpda-5.3.2) with ESMTP id f8OKQtc24770 for ; Mon, 24 Sep 2001 22:26:55 +0200 Message-Id: <200109242026.f8OKQtc24770@foobar.pps.jussieu.fr> Date: Mon, 24 Sep 2001 22:29:22 +0200 Content-Type: text/plain; format=flowed; charset=us-ascii Mime-Version: 1.0 (Apple Message framework v388) To: caml-announce@inria.fr X-Mailer: Apple Mail (2.388) Content-Transfer-Encoding: 7bit Subject: [Caml-announce] coca-ml (downcast of objects) Sender: owner-caml-announce@pauillac.inria.fr Precedence: bulk [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...