caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: "David Allsopp" <dra-news@metastack.com>
To: <caml-list@yquem.inria.fr>
Subject: Re: [Caml-list] warning on value shadowing
Date: Wed, 21 Feb 2007 22:56:26 -0000	[thread overview]
Message-ID: <00f301c7560b$84b8c8c0$6a7ba8c0@treble> (raw)
In-Reply-To: <20070221223151.97901BC76@yquem.inria.fr>

> On Wednesday 21 February 2007 20:41, Sam Steingold wrote:
> > Proposal:
> > When both foo.ml and bar.ml define zot and quux.ml 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.

I agree --- local shadowing is too useful a programming style to have
warnings issued. Though redefining a value at global level is possibly worth
having a warning about.

IMHO Pervasives is the only module that should be opened --- renaming a
module with "module Foo = SomeVeryLongModuleNameYouDontWantToTypeLots" is
better (makes clearer code) than "open ... ". But that's just another
opinion...


       reply	other threads:[~2007-02-21 22:56 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20070221223151.97901BC76@yquem.inria.fr>
2007-02-21 22:56 ` David Allsopp [this message]
2007-02-21 23:20   ` skaller
2007-02-22  0:19   ` Jon Harrop
2007-02-21 20:41 Sam Steingold
2007-02-21 20:57 ` [Caml-list] " Christian Lindig
2007-02-21 21:10   ` Sam Steingold
2007-02-21 21:51     ` David Brown
2007-02-21 23:15       ` skaller
2007-02-21 22:25 ` Jon Harrop
2007-02-22  0:54 ` Jacques Garrigue
2007-02-22  1:09   ` David Brown
2007-02-23 15:12     ` Wolfgang Lux

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='00f301c7560b$84b8c8c0$6a7ba8c0@treble' \
    --to=dra-news@metastack.com \
    --cc=caml-list@yquem.inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).