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 C3B95BB9A for ; Sun, 25 Sep 2005 15:31:43 +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 j8PDVhrC019840 for ; Sun, 25 Sep 2005 15:31:43 +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 PAA17420 for ; Sun, 25 Sep 2005 15:31:42 +0200 (MET DST) Received: from conn.mc.mpls.visi.com (conn.mc.mpls.visi.com [208.42.156.2]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id j8PDVfwP028873 for ; Sun, 25 Sep 2005 15:31:42 +0200 Received: from [192.168.42.2] (bhurt.dsl.visi.com [208.42.141.66]) by conn.mc.mpls.visi.com (Postfix) with ESMTP id 28DCF81DA for ; Sun, 25 Sep 2005 08:31:41 -0500 (CDT) Date: Sun, 25 Sep 2005 08:31:55 -0500 (CDT) From: Brian Hurt X-X-Sender: bhurt@localhost.localdomain To: caml-list Subject: Efficiency of let/and Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Miltered: at concorde with ID 4336A6BF.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at nez-perce with ID 4336A6BD.001 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; set-:01 expr:01 expr:01 parallelism:01 ...:98 variables:02 expressions:03 expressions:03 let:03 let:03 brian:03 brian:03 depends:04 parallel:04 habit:04 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 Say I have two variables I want to set- variable a to the value expr1 and variable b to the value expr2. The two expressions are pure (no side effects), and neither one depends upon the other (neither expr1 nor expr2 contain either a or b as a value), so they can be evaluated in either order or in parallel with no harm. With expressions like these, I've gotten into the habit of using let/and to express the parallelism, that is I go: 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? Just wondering. Brian