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=0.0 required=5.0 tests=AWL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from discorde.inria.fr (discorde.inria.fr [192.93.2.38]) by yquem.inria.fr (Postfix) with ESMTP id A599CBC6B for ; Thu, 22 Feb 2007 00:16:03 +0100 (CET) Received: from ipmail02.adl2.internode.on.net (ipmail02.adl2.internode.on.net [203.16.214.141]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id l1LNG1uF024318 for ; Thu, 22 Feb 2007 00:16:02 +0100 Received: from ppp19-199.lns2.syd7.internode.on.net (HELO rosella) ([59.167.19.199]) by ipmail02.adl2.internode.on.net with ESMTP; 22 Feb 2007 09:45:59 +1030 X-IronPort-AV: i="4.14,203,1170595800"; d="scan'208"; a="87957127:sNHT57519973" Subject: Re: [Caml-list] warning on value shadowing From: skaller To: David Brown Cc: Sam Steingold , Christian Lindig , Caml List In-Reply-To: <45DCBEED.10706@davidb.org> References: <45DCAE89.1050904@gnu.org> <97C89459-B045-4700-8333-FAE31EC648E0@cs.uni-sb.de> <45DCB558.6000601@podval.org> <45DCBEED.10706@davidb.org> Content-Type: text/plain Date: Thu, 22 Feb 2007 10:15:57 +1100 Message-Id: <1172099757.25438.6.camel@rosella.wigram> Mime-Version: 1.0 X-Mailer: Evolution 2.6.1 Content-Transfer-Encoding: 7bit X-Miltered: at discorde with ID 45DCD2B1.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; foo:01 quux:01 foo:01 deliberate:98 sourceforge:01 wrote:01 imho:01 caml-list:01 define:01 ambiguous:02 let:03 let:03 inconsistent:05 wed:06 indeed:07 On Wed, 2007-02-21 at 13:51 -0800, David Brown wrote: > >>> Proposal: When both foo.ml and bar.ml define zot and quux.ml opens > >>> both Foo and Bar, there should be a warning [..] > One could also argue that this condition is an error. IMHO, only an error on use of the ambiguous name. It should be a hard error then. It can be resolved by qualification. I don't believe this is inconsistent with deliberate hiding like let x = e in let x = x + 1 in .. indeed this can also be used to resolve a conflict: open A open B let x = A.x -- John Skaller Felix, successor to C++: http://felix.sf.net