From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: weis Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id WAA03028 for caml-redistribution@pauillac.inria.fr; Sun, 7 Nov 1999 22:42:38 +0100 (MET) Resent-Message-Id: <199911072142.WAA03028@pauillac.inria.fr> 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 LAA30681 for ; Sun, 7 Nov 1999 11:37:17 +0100 (MET) Received: from hugo.int-evry.fr (hugo.int-evry.fr [157.159.100.81]) by nez-perce.inria.fr (8.8.7/8.8.7) with ESMTP id LAA01062; Sun, 7 Nov 1999 11:37:16 +0100 (MET) Received: from (rinderkn@localhost) by hugo.int-evry.fr (8.8.8/jtpda-5.3) id LAA06215 ; Sun, 7 Nov 1999 11:37:12 +0100 (MET) Date: Sun, 7 Nov 1999 11:37:12 +0100 From: Christian RINDERKNECHT To: Jerome Vouillon Cc: caml-list@inria.fr Subject: Re: [Q] Four micro-questions on objects and modules. Message-ID: <19991107113712.B5760@hugo.int-evry.fr> References: <19991102140952.A16438@jones.int-evry.fr> <19991103224029.11296@pauillac.inria.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Mailer: Mutt 0.95.5i In-Reply-To: <19991103224029.11296@pauillac.inria.fr>; from Jerome Vouillon on Wed, Nov 03, 1999 at 10:40:29PM +0100 Resent-From: weis@pauillac.inria.fr Resent-Date: Sun, 7 Nov 1999 22:42:38 +0100 Resent-To: caml-redistribution@pauillac.inria.fr Hello, > > 3) Would it be possible to allow the "include" feature in class > > types? > > What do you mean ? A class type can inherit from another class type : > class type c = object method m : int end > class type d = object inherit c method n : bool end Okay. This is exactly what I was asking for. But... now I am a little bit confused since I was used to think that inheritance was a concept that applies to classes, and (sub)typing to class types. Could you explain? (Please note I am new to these topics...) It may be not related, but the toplevel does not print out the "inherit" construct after the typing of the classes: Objective Caml version 2.02 # class x = object method m = () end ;; class x : object method m : unit end # class y = object inherit x method n = () end ;; class y : object method m : unit method n : unit end ^^^^^^^^^^^^^^^ No "inherit x" used instead here... Best regards, -- Christian ----------------------------------------------------------------------- Christian Rinderknecht Phone +33 (0)1 60 76 44 43 Institut National des Télécommunications Fax +33 (0)1 60 76 47 11 Département Logiciels Réseaux (LOR) WWW 9, Rue Charles Fourier, F-91011 Évry Cedex