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 AAA27564; Tue, 27 Apr 2004 00:38:02 +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 AAA27651 for ; Tue, 27 Apr 2004 00:37:59 +0200 (MET DST) Received: from ms-smtp-01-eri0.ohiordc.rr.com (ms-smtp-01-smtplb.ohiordc.rr.com [65.24.5.135]) by concorde.inria.fr (8.12.10/8.12.10) with ESMTP id i3QMbwYM031241 for ; Tue, 27 Apr 2004 00:37:58 +0200 Received: from vilya (dhcp065-024-145-008.columbus.rr.com [65.24.145.8]) by ms-smtp-01-eri0.ohiordc.rr.com (8.12.10/8.12.7) with ESMTP id i3QMbrUK023032; Mon, 26 Apr 2004 18:37:54 -0400 (EDT) Received: from peuter ([192.168.2.2] ident=mail) by vilya with esmtp (Exim 3.36 #1 (Debian)) id 1BIEjZ-0001ZR-00; Mon, 26 Apr 2004 18:37:53 -0400 Received: from andrewl by peuter with local (Exim 3.36 #1 (Debian)) id 1BIEkZ-0000pV-00; Mon, 26 Apr 2004 18:38:55 -0400 Date: Mon, 26 Apr 2004 18:38:55 -0400 From: Andrew Lenharth To: Jon Harrop Cc: caml-list@inria.fr Subject: Re: [Caml-list] help Message-ID: <20040426223855.GA3179@peuter> References: <200404261842.59208.jdh30@cam.ac.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200404261842.59208.jdh30@cam.ac.uk> User-Agent: Mutt/1.5.5.1+cvs20040105i X-Virus-Scanned: Symantec AntiVirus Scan Engine X-Miltered: at concorde by Joe's j-chkmail ("http://j-chkmail.ensmp.fr")! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 2004:99 2004:99 implemented:01 pervasives:01 yea:99 indirection:01 mutable:01 mutable:01 henri:03 wrote:03 wrote:03 practice:06 type:07 manual:07 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Mon, Apr 26, 2004 at 08:13:42PM +0100, Jon Harrop wrote: > On Sunday 25 April 2004 1:45 pm, Henri DF wrote: > > > I deliberately made "wnum" a reference so that it can be set: > > > > any reason not to make it a mutable ? > > No good reason. ;) Take a look at how it is implemented in Pervasives. >>From the manual: type 'a ref = { mutable contents : 'a; } So, yea, unless you like another layer of indirection, just using mutable should save you a little bit. Andrew -- "It will work in practice, yes. But will it work in theory?" --- a french diplomat's comment, recalled by Madeleine Albright ------------------- 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