[plt-scheme] shadowing initial imports (

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Wed Mar 26 09:39:13 EDT 2008

At Sun, 23 Mar 2008 18:49:12 -0400, Doug Orleans wrote:
> I think this is a good idea-- it's a partial form of something I
> suggested a couple years ago:
> http://list.cs.brown.edu/pipermail/plt-scheme/2006-May/012939.html
> http://list.cs.brown.edu/pipermail/plt-scheme/2006-May/012943.html
> (This specific part, module language having least precedence, is
> mentioned at the end of the second message.)  What do you think of the
> rest of my suggestion?  That is: local bindings should be able to
> override imported bindings, and explicitly imported bindings should be
> able to override implicitly imported bindings.

I think this could work, but after considering it for a while, I still
worry that it's too complicated.

Here's the best I can do for a rationale:

 * The proposed rules don't have as direct a precedent in Scheme as the
   shadowing of initial imports (which has the precedent of internal
   definitions, with the same benefits and same corner-case weirdness
   if you define certain things after using them).

   An analogy to the top level doesn't really work, I think, since the
   top level allows arbitrary re-definition --- and, anyway, the top
   level is hopeless.

 * The notion of "required explicitly" is bound to get tricky now that
   we have macro extension of `require' sub-forms. Source terms that
   you probably wouldn't consider as "explicit" will expand to terms
   that you probably would call "explicit".

   We could address the problem with some sort of explicit "explicit"
   annotation, so this is just another way of saying that it gets

I don't have any real technical arguments --- just a sense that we
should stick with the current choice for a while before considering
anything further.


Posted on the users mailing list.