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 WAA04579; Wed, 6 Aug 2003 22:36:22 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id WAA07841 for ; Wed, 6 Aug 2003 22:36:21 +0200 (MET DST) Received: from ep09.kernel.pl (ep09.kernel.pl [212.87.11.162]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id h76KaKf00356 for ; Wed, 6 Aug 2003 22:36:20 +0200 (MET DST) Received: (qmail 23953 invoked by uid 566); 6 Aug 2003 20:36:15 -0000 Date: Wed, 6 Aug 2003 22:34:03 +0200 From: Michal Moskal To: Caml List Subject: Re: [Caml-list] Safe Obj.dup? Message-ID: <20030806203403.GA18494@roke.freak> Mail-Followup-To: Caml List References: <20030806200250.GA31780@davidb.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030806200250.GA31780@davidb.org> User-Agent: Mutt/1.4.1i X-PGP-Fingerprint: CF89 1B14 11BE 1CC9 2CA3 7497 5E32 69B4 BC71 B4C2 X-AntiVirus: scanned for viruses by AMaViS 0.2.1 (http://amavis.org/) X-Loop: caml-list@inria.fr X-Spam: no; 0.00; michal:01 moskal:01 malekith:01 pld-linux:01 caml-list:01 kernel:01 0700,:01 mutable:01 06,:02 gcs:03 wrote:03 obj:03 let:04 aug:05 dup:05 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Wed, Aug 06, 2003 at 01:02:51PM -0700, David Brown wrote: > Is there an officially safe way of doing an Obj.dup? I have a record > type with mutable fields, and I'd like to be able to make a copy of it. let r = {x = 3; y = 7} in let copy = {r with x = r.x} You cannot say {r with } although I don't see any reason why. -- : Michal Moskal :: http://www.kernel.pl/~malekith : GCS {C,UL}++++$ a? !tv : When in doubt, use brute force. -- Ken Thompson : {E-,w}-- {b++,e}>+++ h ------------------- 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