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 CAA06956; Sat, 19 Oct 2002 02:54:45 +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 CAA07149 for ; Sat, 19 Oct 2002 02:54:44 +0200 (MET DST) Received: from wetware.wetware.com (wetware.wetware.com [199.108.16.1]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id g9J0shD22614 for ; Sat, 19 Oct 2002 02:54:44 +0200 (MET DST) Received: from wetware.com(ra09.wetware.com[199.108.16.89]) (1643 bytes) by wetware.wetware.com via sendmail with P:esmtp/R:bind_hosts/T:inet_zone_bind_smtp (sender: ) id for ; Fri, 18 Oct 2002 17:54:42 -0700 (PDT) (Smail-3.2.0.114 2001-Aug-6 #1 built 2002-Sep-2) Date: Fri, 18 Oct 2002 17:54:45 -0700 Mime-Version: 1.0 (Apple Message framework v546) Content-Type: text/plain; charset=US-ASCII; format=flowed Subject: [Caml-list] functional objects From: james woodyatt To: The Trade Content-Transfer-Encoding: 7bit Message-Id: <5BF65502-E2FD-11D6-B29D-000393BA7EBA@wetware.com> X-Mailer: Apple Mail (2.546) Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk everyone-- Before I file a wish request for this, I'd like to spark a discussion about it. I really like the functional object semantics in Ocaml. I think they're way cool. I'm having a great time exploring what I can do with them. Nothing really mindblowing to show for it yet, but give me time. Anyway, one of the things I find lacking is a way to call a subclass constructor in the copy constructor. In other words, I'd like to have some way to do the following: (* class type with only public methods exposed *) class type foo = object method f: unit end (* class with private members *) class foo x : foo = object val x: int = x method f = () end (* derived functional subclass (notice method g) *) class bar y = object inherit foo 0 val y: int = y method g a b = {< foo a; y = b >} end 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. -- 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