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 627ACBB81 for ; Mon, 26 Sep 2005 09:17:33 +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 j8Q7HMpp012740 for ; Mon, 26 Sep 2005 09:17:22 +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 JAA00888 for ; Mon, 26 Sep 2005 09:17:21 +0200 (MET DST) Received: from rwcrmhc12.comcast.net (rwcrmhc14.comcast.net [216.148.227.89]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id j8Q7HKIA009573 for ; Mon, 26 Sep 2005 09:17:20 +0200 Received: from 192.168.1.100 (c-24-118-210-113.hsd1.mn.comcast.net[24.118.210.113]) by comcast.net (rwcrmhc14) with SMTP id <2005092607171801400og4i8e>; Mon, 26 Sep 2005 07:17:18 +0000 Subject: Re: Ant: [Caml-list] Efficiency of let/and From: Bill Wood To: caml-list@inria.fr In-Reply-To: <20050926055627.GA7592@coruscant.stwing.upenn.edu> References: <20050926043240.24009.qmail@web26809.mail.ukl.yahoo.com> <20050926055627.GA7592@coruscant.stwing.upenn.edu> Content-Type: text/plain Date: Mon, 26 Sep 2005 02:17:17 -0500 Message-Id: <1127719037.16882.4.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.0.1-1mdk Content-Transfer-Encoding: 7bit X-Miltered: at nez-perce with ID 4337A080.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 bindings:01 comcast:98 unbound:01 unbound:01 interaction:01 int:01 caml:02 caml:02 objective:02 objective:02 latter:03 let:03 let:03 style:93 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.1 required=5.0 tests=FORGED_RCVD_HELO autolearn=disabled version=3.0.3 . . . > 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. I'm using Objective Caml version 3.08.3 and had this interaction: # let y = 1 and z = y + 2 in z;; Unbound value y # -- Bill Wood bill.wood@acm.org