Date: Tue, 20 Apr 1999 14:38:06 +0200
From: Didier Remy <firstname.lastname@example.org>
To: Giuseppe Castagna <Giuseppe.Castagna@ens.fr>
Subject: Re: subtyping and inheritance
In-Reply-To: <3715D924.F50D6586@ens.fr>; from Giuseppe Castagna on Thu, Apr 15, 1999 at 02:18:44PM +0200
> Surely, it would require some modifications to the compiler, but all it
> would have to do is to mark some particular methods and all the objects
> that could call these methods by a natural number (for those who know,
> some sort of De Brujin notation, that a purist may consider as dynamic
> type information). How to do it in practice is described for the language
> O2 in  (but without the natural numbers since in O2 the dynamic type
> information is available). This is obtained by simply modifying the
> compiler without affecting the language.
The works  and  that you cite apply to the languages O2 and Java.
However, both languages have a very weak type system. In particular, neither
one supports polymorphic types (hence parametric classes) or self types.
Thus, I don't think that your experiences with O2 and Java can immediately
be transfered to Ocaml. In particular, adding dynamics types in the
presence of polymorphism is much more complex than the simple sketch above.
Also, regarding type checking, you probably need the higher-order version of
lambda-&, which is much more difficult than the first-order version that you
are using in  and . Of course, type inference is likely to be another
So I do not think that applying  or  to Ocaml is an implementation
exercise. It certainly remains an interesting, but serious and probably
difficult, research project.
This archive was generated by hypermail 2b29 : Sun Jan 02 2000 - 11:58:22 MET