Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] Deep copy
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: sebastien FURIC <sebastien.furic@t...>
Subject: Re: [Caml-list] Deep copy

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 ?


To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: