Emmanuel Chailloux



Title:  Preuves, Programmes et Systemes


Abstract:  The main difference between LISP and ML comes from their types system: dynamic or static typechecking.

Each community can promote either the freedom from the dynamic typing for LISP
or the safety given from the static typing for ML. There are some cases where a full static typing must be opened to integrate new features as object-oriented features and persistence of values.

For example, the {\OCAML}  object extension has some high level features as the
multiple inheritance and parametric classes. This extension distinguishes inheritance and subtyping. By using the late binding for method call in conjunction with the subtyping relation it gives a kind of inclusion polymorphism from the  objects languages.

Nevertheless we can not build a classical classes hierarchy mainly because it is impossible to ``downcast'' an object to a subclass.

We propose here to present a light extension, realized in {\tt{camlp4}}, to allow ``cast''  this transtyping  between objects belonging to a same classes hierarchy. With this we can build some ``design patterns'', which are not allowed in pure {\OCAML}, and we can implement a safe mechanism for objects persistence..