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 nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id 1A00CBB81 for ; Mon, 26 Sep 2005 07:56:34 +0200 (CEST) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id j8Q5uXOd002640 for ; Mon, 26 Sep 2005 07:56:33 +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 HAA32696 for ; Mon, 26 Sep 2005 07:56:33 +0200 (MET DST) Received: from yavin.stwing.upenn.edu (YAVIN.STWING.upenn.edu [165.123.132.64]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id j8Q5uV4B002633 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL) for ; Mon, 26 Sep 2005 07:56:32 +0200 Received: from localhost (localhost [127.0.0.1]) by yavin.stwing.upenn.edu (Postfix) with ESMTP id 58D4CAF1 for ; Mon, 26 Sep 2005 01:56:31 -0400 (EDT) Received: from yavin.stwing.upenn.edu ([127.0.0.1]) by localhost (yavin.stwing.upenn.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 21771-01 for ; Mon, 26 Sep 2005 01:56:31 -0400 (EDT) Received: from coruscant.stwing.upenn.edu (FORCE.STWING.UPENN.EDU [165.123.132.62]) by yavin.stwing.upenn.edu (Postfix) with ESMTP id 0DD897D1 for ; Mon, 26 Sep 2005 01:56:31 -0400 (EDT) Received: by coruscant.stwing.upenn.edu (Postfix, from userid 5302) id CADE2E51E; Mon, 26 Sep 2005 01:56:30 -0400 (EDT) Date: Mon, 26 Sep 2005 01:56:29 -0400 From: William Lovas To: caml-list@inria.fr Subject: Re: Ant: [Caml-list] Efficiency of let/and Message-ID: <20050926055627.GA7592@coruscant.stwing.upenn.edu> Mail-Followup-To: caml-list@inria.fr 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.5.6i X-Virus-Scanned: amavisd-new at stwing.upenn.edu X-Miltered: at nez-perce with ID 43378D91.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at nez-perce with ID 43378D8F.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; lovas:01 wlovas:01 stwing:01 upenn:01 caml-list:01 bindings:01 26,:98 wrote:01 unbound:01 int:01 semantic:02 caml:02 objective:02 dependent:02 expressions:03 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 On Mon, Sep 26, 2005 at 06:32:40AM +0200, Martin Chabr wrote: > As it appears to me, there is no semantic difference > between both alternatives. It can be shown with two > dependent expressions y = 1 and z = y + 2: This is not universally true: > # let y = 1 > and z = y + 2 in > z;; > - : int = 3 Objective Caml version 3.08.1 # let y = 1 and z = y + 2 in z;; Unbound value y So either you are using a version older than 3.08.1 or this is a fairly recent change. In the latter case, people who wish to remain backward- compatible might eschew this style for sequential bindings, regardless of any potential performance problems. William