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 TAA18627; Wed, 20 Aug 2003 19:09:19 +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 TAA19570 for ; Wed, 20 Aug 2003 19:09:18 +0200 (MET DST) Received: from mail.speakeasy.net (mail9.speakeasy.net [216.254.0.209]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id h7KH9HT26157 for ; Wed, 20 Aug 2003 19:09:17 +0200 (MET DST) Received: (qmail 602 invoked from network); 20 Aug 2003 17:09:15 -0000 Received: from unknown (HELO grace.speakeasy.org) ([216.254.0.2]) (envelope-sender ) by mail9.speakeasy.net (qmail-ldap-1.03) with DES-CBC3-SHA encrypted SMTP for ; 20 Aug 2003 17:09:15 -0000 Date: Wed, 20 Aug 2003 10:09:15 -0700 (PDT) From: brogoff@speakeasy.net To: Benjamin Geer cc: Brian Hurt , "caml-list@inria.fr" Subject: Re: [Caml-list] does class polymorphism need to be so complicated? In-Reply-To: <3F43A115.6080201@socialtools.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Loop: caml-list@inria.fr X-Spam: no; 0.00; brogoff:01 caml-list:01 foo:01 int-:01 unit-:01 baz:01 quux:01 bool:01 speakeasy:01 int:01 unit:03 string:03 object:03 complicated:04 polymorphism:06 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk The extension of Brian's code to rows with more than one field is obvious though, isn't it? type fbbq = int; bar: unit->string; baz: unit->bool;quux: unit->unit> class thing_processor = object method do_something (o : fbbq) = (* do something that calls all those methods *) method do_something_else (o : fbbq) = (* do something else that calls all those methods *) end -- Brian ------------------- 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