From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id JAA10389 for caml-redistribution; Thu, 28 Jan 1999 09:14:04 +0100 (MET) 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 PAA17367 for ; Wed, 27 Jan 1999 15:45:52 +0100 (MET) Received: from miss.wu-wien.ac.at (miss.wu-wien.ac.at [137.208.107.17]) by nez-perce.inria.fr (8.8.7/8.8.7) with ESMTP id PAA17217; Wed, 27 Jan 1999 15:45:49 +0100 (MET) Received: (from mottl@localhost) by miss.wu-wien.ac.at (8.9.0/8.9.0) id PAA23891; Wed, 27 Jan 1999 15:45:49 +0100 (MET) From: Markus Mottl 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) Cc: caml-list@inria.fr (OCAML) In-Reply-To: <19990127151827.16711@pauillac.inria.fr> from "Jerome Vouillon" at Jan 27, 99 03:18:27 pm X-Mailer: ELM [version 2.4 PL21] MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Sender: weis > 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