From: Markus Mottl <mottl@miss.wu-wien.ac.at>
Message-Id: <199901271445.PAA23891@miss.wu-wien.ac.at>
Subject: Re: subtyping and inheritance
To: Jerome.Vouillon@inria.fr (Jerome Vouillon)
Date: Wed, 27 Jan 1999 15:45:48 +0100 (MET)
In-Reply-To: <19990127151827.16711@pauillac.inria.fr> from "Jerome Vouillon" at Jan 27, 99 03:18:27 pm
> On Mon, Jan 25, 1999 at 01:08:30AM +0100, Markus Mottl wrote:
> [...]
> > So far it seems that things would be unsafe with covariance. But now,
> > Castagna answers my (former) question, whether making "reappear" methods
> > from ancestors would be safe: it is...
> >
> > The paper looked difficult at first, but turned out to be surprisingly
> > easy to read: Castagna makes the theorie very intuitively clear with his
> > examples of classes "2DPoint" and "3DPoint" and how methods are chosen
> > in the different models.
> >
> > The record based method (as found in OCAML - the object (record)
> > determines, which method is selected, arguments are not considered)
> > can be obviously extended to support covariance.
>
> However, it is not possible to apply this extension to Ocaml. Indeed,
> it requires that methods are chosen depending on the dynamic type of
> their arguments. But this information is not available in Ocaml.
> There are also difficulties for type inference.
What a pity...
At least we know now, that design questions have to be solved quite
differently in OCAML than in some other OO-languages.
Regards,
Markus
-- Markus Mottl, mottl@miss.wu-wien.ac.at, http://miss.wu-wien.ac.at/~mottl
This archive was generated by hypermail 2b29 : Sun Jan 02 2000 - 11:58:18 MET