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 RAA17928; Wed, 24 Mar 2004 17:57:15 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id RAA17937 for ; Wed, 24 Mar 2004 17:57:14 +0100 (MET) Received: from calmail-cl.berkeley.edu (mailfarm.Berkeley.EDU [128.32.61.106]) by concorde.inria.fr (8.12.10/8.12.10) with ESMTP id i2OGvCHd018849 for ; Wed, 24 Mar 2004 17:57:13 +0100 Received: from [64.162.212.212] (HELO tallman.kefka.frap.net) by calmail-cl.berkeley.edu (CommuniGate Pro SMTP 4.1.8) with SMTP id 9102536; Wed, 24 Mar 2004 08:57:11 -0800 Received: by tallman.kefka.frap.net (sSMTP sendmail emulation); Wed, 24 Mar 2004 08:57:10 -0800 Date: Wed, 24 Mar 2004 08:57:10 -0800 From: Kenneth Knowles To: Alex Baretta Cc: Ocaml Subject: Re: [Caml-list] Delegation based OO Message-ID: <20040324165710.GA13918@tallman.kefka.frap.net> References: <405EBD5D.1000406@baretta.com> <20040323.080154.71097954.yoriyuki@mbg.ocn.ne.jp> <20040323002926.GA30057@kefka.frap.net> <20040324.084300.18291498.yoriyuki@mbg.ocn.ne.jp> <20040324004548.GA19738@tallman.kefka.frap.net> <40616664.4040500@baretta.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <40616664.4040500@baretta.com> User-Agent: Mutt/1.5.6i X-Miltered: at concorde by Joe's j-chkmail ("http://j-chkmail.ensmp.fr")! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; knowles:99 caml-list:01 2004:99 baretta:01 overriding:01 foo:01 inherit:01 alex:01 essentially:02 typing:03 classes:03 wrote:03 inheritance:03 inheritance:03 object:03 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk X-Status: X-Keywords: X-UID: 350 On Wed, Mar 24, 2004 at 11:43:48AM +0100, Alex Baretta wrote: > Delegation is no relative of inheritance. Inheritance is a syntactic > property (essentially classes inherit code), whereas delegation is a > semantic property: once one method is delegated by a proxy object to an > executor object, the the visibility of the proxy is lost. The method is > executed as if it were invoked directly on the executor. I disagree with the "syntactic" vs "semantic" distinction, but the message that they are different animals is exactly my point as well; I contrast the two because previous messages had compared them (mention of "overriding"). The debate seems to really be about which methods should be delegated, which is easily regulated by typing. "delegate x to y" could be "delegate (y :> x)" so you avoid yet another language construct. Most of the time I would expect this to actually occur like so: class foo (del : delegate_class_type) = object delegate del (* Don't need any type annotation or "to" keyword here *) end Kenn ------------------- 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