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 GAA29041; Mon, 21 Oct 2002 06:10:10 +0200 (MET DST) 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 GAA28081 for ; Mon, 21 Oct 2002 06:10:09 +0200 (MET DST) Received: from wetware.wetware.com (wetware.wetware.com [199.108.16.1]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id g9L4A7518738; Mon, 21 Oct 2002 06:10:07 +0200 (MET DST) Received: from wetware.com(ra06.wetware.com[199.108.16.86]) (1345 bytes) by wetware.wetware.com via sendmail with P:esmtp/R:bind_hosts/T:inet_zone_bind_smtp (sender: ) id for ; Sun, 20 Oct 2002 21:10:06 -0700 (PDT) (Smail-3.2.0.114 2001-Aug-6 #1 built 2002-Sep-2) Date: Sun, 20 Oct 2002 21:10:09 -0700 Subject: Re: [Caml-list] functional objects Content-Type: text/plain; charset=US-ASCII; format=flowed Mime-Version: 1.0 (Apple Message framework v546) Cc: The Trade To: Didier.Remy@inria.fr From: james woodyatt In-Reply-To: <20021019224823.A17599@morgon.inria.fr> Message-Id: Content-Transfer-Encoding: 7bit X-Mailer: Apple Mail (2.546) Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Saturday, Oct 19, 2002, at 13:48 US/Pacific, Didier Remy wrote: > [I wrote:] >> What I want is for a superclass class to be able to expose an >> interface >> to subclasses for constructing copies with arguments. Is this a bad >> idea? Has it already been considered and rejected? Just curious. > > Would the following code makes you happy? > [...] > (* derived functional subclass (notice method g) *) > class bar y = object > inherit foo 0 > val y: int = y > method g a b = {< y = b >} # foo a > end;; What would that look like in the multiple inheritance case? -- j h woodyatt markets are only free to the people who own them. ------------------- 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