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 UAA21386; Mon, 15 Jul 2002 20:11:41 +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 UAA21385 for ; Mon, 15 Jul 2002 20:11:40 +0200 (MET DST) X-SPAM-Warning: Sending machine is listed in blackholes.five-ten-sg.com Received: from athlon.baretta.com (r-mi214-6a227.tin.it [62.211.4.227]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id g6FIBcn25784 for ; Mon, 15 Jul 2002 20:11:39 +0200 (MET DST) Received: from baretta.com (localhost.localdomain [127.0.0.1]) by athlon.baretta.com (Postfix) with ESMTP id 795FE2724F for ; Mon, 15 Jul 2002 20:18:40 +0200 (CEST) Message-ID: <3D331200.4070401@baretta.com> Date: Mon, 15 Jul 2002 20:18:40 +0200 From: Alessandro Baretta Organization: Baretta srl -- www.baretta.com User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.0) Gecko/20020529 X-Accept-Language: it, en MIME-Version: 1.0 To: Ocaml Subject: Re: [Caml-list] Deep copy References: <0489A7888F080B4BA73B53F7E145F29A1B0AF5@LANMHS20.rd.francetelecom.fr> <200207151824.30541.erayo@cs.bilkent.edu.tr> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Eray Ozkural wrote: > An equivalent of C++'s copy constructor would be > required. Can this be done without going "inside" the > 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