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 7F0BBBB81 for ; Mon, 26 Sep 2005 07:24:25 +0200 (CEST) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id j8Q5OOfC002843 for ; Mon, 26 Sep 2005 07:24:24 +0200 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 HAA32149 for ; Mon, 26 Sep 2005 07:24:24 +0200 (MET DST) Received: from sark4.cc.gatech.edu (sark4.cc.gatech.edu [130.207.7.19]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id j8Q5OM3T032537 for ; Mon, 26 Sep 2005 07:24:23 +0200 Received: from gaia.cc.gatech.edu (gaia.cc.gatech.edu [130.207.3.8]) by sark4.cc.gatech.edu (8.12.10/8.12.8) with ESMTP id j8Q5OLhb000125; Mon, 26 Sep 2005 01:24:21 -0400 (EDT) Received: (from fernando@localhost) by gaia.cc.gatech.edu (8.12.10/8.12.8) id j8Q5OKPq017757; Mon, 26 Sep 2005 01:24:20 -0400 (EDT) Date: Mon, 26 Sep 2005 01:24:20 -0400 From: Fernando Alegre To: Martin Chabr Cc: Brian Hurt , caml-list@inria.fr Subject: Re: Ant: [Caml-list] Efficiency of let/and Message-ID: <20050926052420.GA17173@gaia.cc.gatech.edu> References: <20050926043240.24009.qmail@web26809.mail.ukl.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050926043240.24009.qmail@web26809.mail.ukl.yahoo.com> User-Agent: Mutt/1.4.2.1i X-Miltered: at concorde with ID 43378608.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at nez-perce with ID 43378606.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; gatech:01 caml-list:01 compiler:01 expr:01 expr:01 ...:98 ...:98 let:03 let:03 probably:05 variable:05 matching:05 fernando:06 fernando:06 edu:07 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 There is a small advantage in using "and" instead of "in let": # let () = let x = 2 and x = 5 in ();; This variable is bound several times in this matching # let () = let x = 2 in let x = 5 in ();; Probably the second "x" should have been a "y"... so the compiler catches that mistake. Fernando > > let a = expr1 > > and b = expr2 > > in > > ... > > > > rather than: > > let a = expr1 in > > let b = expr2 in > > > > So my question is: is there any value (other than > > the documentation value) > > in doing this?