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 SAA18766; Mon, 15 Jul 2002 18:23:30 +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 SAA18836 for ; Mon, 15 Jul 2002 18:23:29 +0200 (MET DST) Received: from mailhost.tni.fr (firewall.tni.fr [195.25.255.61]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id g6FGNSn23712 for ; Mon, 15 Jul 2002 18:23:28 +0200 (MET DST) Received: from groscool.tni.fr ([195.25.255.1]) by mailhost.tni.fr (Netscape Messaging Server 3.62) with SMTP id 5059; Mon, 15 Jul 2002 18:23:05 +0200 Received: from 192.168.7.72 by groscool.tni.fr (InterScan E-Mail VirusWall NT); Mon, 15 Jul 2002 18:23:04 +0200 (Paris, Madrid (heure d'été)) Message-ID: <3D32F6BF.CBB0EC81@tni.fr> Date: Mon, 15 Jul 2002 18:22:23 +0200 From: "sebastien FURIC" X-Mailer: Mozilla 4.7 [fr] (WinNT; I) X-Accept-Language: fr MIME-Version: 1.0 To: zze-MARCHEGAY Michael stagiaire FTRD/DTL/LAN CC: caml-list@inria.fr Subject: Re: [Caml-list] Deep copy References: <0489A7888F080B4BA73B53F7E145F29A1B0AF3@LANMHS20.rd.francetelecom.fr> Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk zze-MARCHEGAY Michael stagiaire FTRD/DTL/LAN a écrit : > > Hi all, > > I'm writting a program that manipulates a graph structure and I need to make > deep copies of some of the graph nodes. The function Oo.copy donesn't perform > a deep copy and I haven't found any other that could make it. > > Actually, the nodes of my graph are specified using a lot inheritance, and if > I want to write specific "copy" methods for them, I will need to disperse the > clonning actions downto the leaf of my inheritance tree. If your "copy" methods are really specific, I don't see any way of doing that without reimplementing "copy" in each class you want to change objects' behavior of... This is object-orientation. Or maybe I don't understand your problem. Why "functional copy" (i.e. {< ... >}) don't solve your problem ? Cheers, Sébastien. ------------------- 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