From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id PAA14742; Thu, 21 Aug 2003 15:11:44 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f 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 PAA06607 for ; Thu, 21 Aug 2003 15:11:42 +0200 (MET DST) Received: from aomori.annexia.org (annexia.force9.co.uk [212.56.101.183]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id h7LDBVT00765 for ; Thu, 21 Aug 2003 15:11:36 +0200 (MET DST) Received: from rich by aomori.annexia.org with local (Exim 3.36 #1 (Debian)) id 19ppDl-0007s4-00 for ; Thu, 21 Aug 2003 14:11:21 +0100 Date: Thu, 21 Aug 2003 14:11:21 +0100 Cc: caml-list@inria.fr Subject: Re: [Caml-list] does class polymorphism need to be so complicated? Message-ID: <20030821131121.GA30240@redhat.com> References: <3F43E250.1040903@socialtools.net> <20030821092849B.garrigue@kurims.kyoto-u.ac.jp> <3F448015.8090106@socialtools.net> <20030821175808V.garrigue@kurims.kyoto-u.ac.jp> <3F449301.8050500@socialtools.net> <873cfvz148.dlv@wanadoo.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <873cfvz148.dlv@wanadoo.fr> User-Agent: Mutt/1.5.4i From: Richard Jones X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 freshmeat:01 team's:01 ltd:98 0200,:01 writes:01 remi:01 vanicat:01 business:96 unit:03 wrote:03 obj:03 object:03 data:03 prototype:04 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Thu, Aug 21, 2003 at 01:44:23PM +0200, Remi Vanicat wrote: > Benjamin Geer writes: > > class type virtual printer = object > > method virtual print : #printable -> unit > > end ;; > > > > class type virtual talker = object > > method virtual talk : #printable -> unit > > end ;; > > > > class my_printer_talker () = object (self : #printer; #talker) > > method print obj = (* ... *) > > method talk obj = (* ... *) > > end ;; > > well this work : > > class my_printer_talker () = object (self : 's) > constraint 's = #printer > constraint 's = #talker > method print obj = (* ... *) > method talk obj = (* ... *) > end ;; Is there a way to add extra methods to my_printer_talker? Rich. -- Richard Jones. http://www.annexia.org/ http://freshmeat.net/users/rwmj Merjis Ltd. http://www.merjis.com/ - all your business data are belong to you. 'There is a joke about American engineers and French engineers. The American team brings a prototype to the French team. The French team's response is: "Well, it works fine in practice; but how will it hold up in theory?"' ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners