<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE message PUBLIC
  "-//MLarc//DTD MLarc output files//EN"
  "../../mlarc.dtd"[
  <!ATTLIST message
    listname CDATA #REQUIRED
    title CDATA #REQUIRED
  >
]>

  <?xml-stylesheet href="../../mlarc.xsl" type="text/xsl"?>


<message 
  url="2002/07/72c2dc79654035cd9f28bd2d5e20f330"
  from="Alessandro Baretta &lt;alex@b...&gt;"
  author="Alessandro Baretta"
  date="2002-07-15T18:11:41"
  subject="Re: [Caml-list] Deep copy"
  prev="2002/07/873b748069a397a4d4473a9c160fe422"
  next="2002/07/2b9b4fa0cd7e7bf77d2e5f5b48ff6c3f"
  prev-in-thread="2002/07/0908d34fdb197e026aad915879cf4cd2"
  next-in-thread="2002/07/e05cd085c84fab343d2798f03cabcf5e"
  prev-thread="2002/07/a6ba0ce22f3d5db7ef94de3a44da9825"
  next-thread="2002/07/2fe55408b32aa0c8bbfe694c2fc4d83a"
  root="../../"
  period="month"
  listname="caml-list"
  title="Archives of the Caml mailing list">

<thread subject="RE: [Caml-list] Deep copy">
<msg 
  url="2002/07/f588263f2499215c76c4696e61086612"
  from="zze-MARCHEGAY Michael stagiaire FTRD/DTL/LAN &lt;michael.marchegay@r...&gt;"
  author="zze-MARCHEGAY Michael stagiaire FTRD/DTL/LAN"
  date="2002-07-15T15:24:59"
  subject="RE: [Caml-list] Deep copy">
<msg 
  url="2002/07/0908d34fdb197e026aad915879cf4cd2"
  from="Eray Ozkural &lt;erayo@c...&gt;"
  author="Eray Ozkural"
  date="2002-07-15T15:30:19"
  subject="Re: [Caml-list] Deep copy">
<msg 
  url="2002/07/72c2dc79654035cd9f28bd2d5e20f330"
  from="Alessandro Baretta &lt;alex@b...&gt;"
  author="Alessandro Baretta"
  date="2002-07-15T18:11:41"
  subject="Re: [Caml-list] Deep copy">
</msg>
</msg>
<msg 
  url="2002/07/e05cd085c84fab343d2798f03cabcf5e"
  from="Alessandro Baretta &lt;alex@b...&gt;"
  author="Alessandro Baretta"
  date="2002-07-15T19:46:53"
  subject="Re: [Caml-list] Deep copy">
<msg 
  url="2002/07/15f5a5b0e7c6ba77a94ba8a6b6e1d150"
  from="John Prevost &lt;j.prevost@c...&gt;"
  author="John Prevost"
  date="2002-07-15T22:28:33"
  subject="Re: [Caml-list] Deep copy">
<msg 
  url="2002/07/101f631797d254be4dac4a73b379b0ee"
  from="Alessandro Baretta &lt;alex@b...&gt;"
  author="Alessandro Baretta"
  date="2002-07-15T22:56:31"
  subject="Re: [Caml-list] Deep copy">
<msg 
  url="2002/07/f49c5a97e201b0f6ea5977beb5930c17"
  from="John Prevost &lt;j.prevost@c...&gt;"
  author="John Prevost"
  date="2002-07-16T08:13:08"
  subject="Re: [Caml-list] Deep copy">
</msg>
</msg>
</msg>
</msg>
</msg>
</thread>

<contents>
Eray Ozkural wrote:
 &gt; An equivalent of C++'s copy constructor would be
 &gt; required. Can this be done without going "inside" the
 &gt; ocaml system? :)

Please, leave copy constructors alone. They are among the
most hideous enemies of an OO programmer. The copy 
constructor always has very delicate interactions with 
assignment and function invocation, and since one often 
needs to redefine the copy constructor, for example to get 
deep copies as opposed to shallow copies, it is a serious 
source of bugs.

O'Caml has a neat OO system, with a single constructor and 
no destructors. I don't think it needs to borrow many ideas 
from C++.

Alex

-------------------
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

</contents>

</message>

