Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-announce] coca-ml (downcast of objects)
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ 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]


   I have made a small extension to ocaml 3-02 called coca-ml and using 
   to allow "down cast" of objects between classes in relations of 
   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 
     is raised.

   coca-ml home page is :

   Please send the bug reports
               or your remarks to

Emmanuel Chailloux...



   J'ai fait une petite extension d'ocaml 3-02 appelee coca-ml et 
   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 
     pas le cas une exception est declenchee.

  la page web de  coca-ml est :

   Veuillez envoyer vos rapports d'anomalies
                    ou vos remarques a'

Emmanuel Chailloux...