From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: * X-Spam-Status: No, score=1.1 required=5.0 tests=AWL,SPF_SOFTFAIL autolearn=disabled version=3.1.3 Received: from discorde.inria.fr (discorde.inria.fr [192.93.2.38]) by yquem.inria.fr (Postfix) with ESMTP id E32F0BC69 for ; Wed, 21 Feb 2007 23:13:21 +0100 (CET) Received: from mail.davidb.org (mail.davidb.org [66.93.32.219]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id l1LMDKVa012496 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Wed, 21 Feb 2007 23:13:21 +0100 Received: from localhost ([127.0.0.1]) by mail.davidb.org with esmtpa (Exim 4.62 #1 (Debian)) id 1HJziB-00087l-Qi; Wed, 21 Feb 2007 14:13:19 -0800 Message-ID: <45DCC3FF.9040805@davidb.org> Date: Wed, 21 Feb 2007 14:13:19 -0800 From: David Brown User-Agent: Thunderbird 1.5.0.9 (X11/20061221) MIME-Version: 1.0 To: Sam Steingold Cc: caml-list@inria.fr, Christian Lindig Subject: Re: [Caml-list] Re: warning on value shadowing References: <45DCAE89.1050904@gnu.org> <97C89459-B045-4700-8333-FAE31EC648E0@cs.uni-sb.de> <45DCB558.6000601@podval.org> <45DCBEED.10706@davidb.org> <45DCC1E8.3050807@gnu.org> In-Reply-To: <45DCC1E8.3050807@gnu.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Miltered: at discorde with ID 45DCC400.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; bindings:01 wrote:01 caml-list:01 caml-list:01 modules:02 ambiguous:02 top-level:02 construct:02 redefine:03 let:03 let:03 guess:04 problem:05 meant:06 useful:08 Sam Steingold wrote: >> The problem with this as a warning, is that outside of multiple >> modules, this scenario is fairly common: >> >> let x = ... >> let x = ... x ... >> > 3 shadow a global value with a local one (warning) > 4 redefine a local value as in your example (no warning) I guess my example was a little ambiguous. Those were meant to be top-level bindings. I've seen this construct fairly commonly. It is especially useful when making something that wraps around another call, adding a bit more functionality. Dave