Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
warning on value shadowing
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2007-02-23 (20:40)
From: Sam Steingold <sds@g...>
Subject: Re: warning on value shadowing
Jon Harrop wrote:
> On Wednesday 21 February 2007 20:41, Sam Steingold wrote:
>> Proposal:
>> When both and define zot and opens both Foo and
>> Bar, there should be a warning (when compiling quux) about Foo.zot being
>> shadowed by Bar.zot (or vice versa, depending on the order of the open
>> statements).
> I think this is such a common style (I use shadowing deliberately all the 
> time) that it would be very annoying to be warned about it.

of course there should be a way to tell the compiler that the shadowing 
is intentional.