From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by walapai.inria.fr (8.13.6/8.13.6) with ESMTP id q05Lamua005344 for ; Thu, 5 Jan 2012 22:36:48 +0100 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AhwFAOQWBk9QRFuw/2dsb2JhbABCggWqeYEFgXIBAQU6PxALGBwSFCghiA+2LIUVhhljBJUFkjY X-IronPort-AV: E=Sophos;i="4.71,464,1320620400"; d="scan'208";a="125760344" Received: from furbychan.cocan.org ([80.68.91.176]) by mail4-smtp-sop.national.inria.fr with ESMTP/TLS/AES256-SHA; 05 Jan 2012 22:36:43 +0100 Received: from rich by furbychan.cocan.org with local (Exim 4.72) (envelope-from ) id 1RiuzE-00084Q-H9; Thu, 05 Jan 2012 21:36:36 +0000 Date: Thu, 5 Jan 2012 21:36:36 +0000 From: "Richard W.M. Jones" To: ivan chollet Cc: Lukasz Stafiniak , Diego Olivier Fernandez Pons , caml-list Message-ID: <20120105213636.GA30972@annexia.org> References: <20120105200442.GA17669@annexia.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) Subject: Re: [Caml-list] Examples where let rec is undesirable On Thu, Jan 05, 2012 at 08:27:25PM +0000, ivan chollet wrote: > Allowing variable shadowing is aesthetically more satisfying and more > expressive, but opens the door to bugs that can be harder to track by > static analysis. You'll have to explain a bit more why this is. Also, why is variable shadowing bad within a function (in C), but just fine across different functions? Surely if it's bad at all, every local variable in the whole program should have a unique name? Rich. -- Richard Jones Red Hat