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 QAA13615; Tue, 16 Jul 2002 16:15:50 +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 QAA13626 for ; Tue, 16 Jul 2002 16:15:50 +0200 (MET DST) Received: from mel-rto6.wanadoo.fr (smtp-out-6.wanadoo.fr [193.252.19.25]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id g6GEFnT15933 for ; Tue, 16 Jul 2002 16:15:49 +0200 (MET DST) Received: from mel-rta7.wanadoo.fr (193.252.19.61) by mel-rto6.wanadoo.fr (6.5.007) id 3D18683700B90F0C; Tue, 16 Jul 2002 16:15:46 +0200 Received: from AlphaSystem.dnsalias.net (80.11.74.121) by mel-rta7.wanadoo.fr (6.5.007) id 3D2A78FA003A4CED; Tue, 16 Jul 2002 16:15:45 +0200 Received: from localhost ([127.0.0.1] helo=alphasystem.dnsalias.net) by AlphaSystem.dnsalias.net with esmtp (Exim 3.36 #1 (Debian)) id 17UT7A-000CCg-00; Tue, 16 Jul 2002 16:15:45 +0200 From: "Johan Baltié" To: Alessandro Baretta , John Prevost , Ocaml Subject: Re: [Caml-list] Recovering masked methods (with CamlP4?) Date: Tue, 16 Jul 2002 15:15:44 +0100 Message-Id: <20020716141544.M28553@wanadoo.fr> In-Reply-To: <3D342875.2000704@baretta.com> References: <3D335729.3020307@baretta.com> <20020716101520Q.garrigue@kurims.kyoto-u.ac.jp> <3D33E74C.6050307@baretta.com> <20020716095939.M27616@wanadoo.fr> <3D33FE98.6000001@baretta.com> <86u1mzu7c7.fsf@laurelin.dementia.org> <3D342875.2000704@baretta.com> X-Mailer: Open WebMail 1.61 20020204 X-OriginatingIP: 192.6.2.192 (baltie_j) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk > John Prevost wrote: > > > You've simply got the wrong ordering in your inheritance. There's > > absolutely no need for more functionality to support accessing "older" > > methods in this case. (I'd argue there's no need in any case.) And > > again, even if method m had to be different in var_b, it would be > > better to use an inherited class which has the features common to b > > and var_b. In this case, that class is identical to b. > > > > John. > > Not a bad idea, actually. From a conceptual standpoint it > works. It did not occur to me go about coding that way > because my classes come in "related packages", and given > this conceptual grouping, it would sort of look funny to > implement what you suggested. > ... > Now that you make me think of it, all I need is an > intermediate class in my hierarchy, factoring all the the > common functionality with the exception of two methods: > let's say m and n. I'll then have a package inherit from the > common ancestor and redefine m, while the other package > redefines n. This intermediate layer will remove the need to > call a method in a farther ancestor. > > Thank you for the suggestion. > > Alex I think I express myself very badly because it sounds like my little B' class.... *sigh* :,( Ciao Jo ------------------- 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