From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id 2F8D2BBAF for ; Wed, 19 Jul 2006 17:09:05 +0200 (CEST) Received: from ext.lri.fr (ext.lri.fr [129.175.15.4]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id k6JF94T5031639 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Wed, 19 Jul 2006 17:09:05 +0200 Received: from smtp.lri.fr (serveur3-5 [129.175.3.5]) by ext.lri.fr (Postfix) with ESMTP id 87434202156; Wed, 19 Jul 2006 17:09:04 +0200 (CEST) Received: from pc9-152.lri.fr (pc9-152 [129.175.9.152]) by smtp.lri.fr (Postfix) with ESMTP id DFBC4CED98; Wed, 19 Jul 2006 17:09:03 +0200 (CEST) Received: from filliatr by pc9-152.lri.fr with local (Exim 4.60) (envelope-from ) id 1G3Dfe-0001OY-AP; Wed, 19 Jul 2006 17:09:06 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <17598.19218.262024.342449@pc9-152.lri.fr> Date: Wed, 19 Jul 2006 17:09:06 +0200 To: Richard Jones Cc: Yoann Padioleau , caml-list@yquem.inria.fr, Andreas Biegert Subject: Re: [Caml-list] global record In-Reply-To: <20060719145033.GA22434@furbychan.cocan.org> References: <20060719140729.GA26227@furbychan.cocan.org> <871wshveu3.fsf@wanadoo.fr> <20060719145033.GA22434@furbychan.cocan.org> X-Mailer: VM 7.19 under Emacs 21.4.1 From: Jean-Christophe Filliatre X-Virus-Scanned: by amavisd-new at lri.fr X-Miltered: at concorde with ID 44BE4B10.002 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; filliatre:01 filliatr:01 lri:01 val:01 val:01 command-line:01 parsing:01 ocaml:01 2006:98 wrote:01 writes:01 writes:01 caml-list:01 string:02 string:02 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.3 Richard Jones writes: > On Wed, Jul 19, 2006 at 04:39:32PM +0200, Yoann Padioleau wrote: > > Richard Jones writes: > > > val username : string > > > > You certainly mean > > val username: string ref > > No, I mean: > > val username : string and I confirm :-) I use the same trick of dereferencing the references used for command-line parsing as soon as it is done and I find this very convenient. This can be realized in the very first module on your ocaml link command, and thus in whole the remaining of your code you do not need to use the deref operator (!) anymore. -- Jean-Christophe