[plt-scheme] On PLaneT packages and compatible upgrades

From: Doug Orleans (dougorleans at gmail.com)
Date: Wed May 10 14:53:19 EDT 2006

Jens Axel Søgaard writes:
 > Doug Orleans wrote:
 > > I never quite understood why modules are different from the top-level
 > > in this respect:
 > > 
 > > (require (planet "foo.ss" ("cobbe" "foo.plt" 1)))
 > > (define g (lambda (y) ...))
 > > 
 > > If you evaluate these two expressions at the top-level, there are no
 > > conflicts, and if you later use g, you get the "local" g instead of
 > > whatever might be imported from the package.  Why must this be
 > > considered an error inside a module?
 > 
 > Here is one attempt to give a reason:
 > 
 > <http://list.cs.brown.edu/pipermail/plt-scheme/2005-January/007611.html>

That's an answer to a slightly different question, of why requiring
the same name twice is an error.  (Though I agree these are both
subquestions of why module require doesn't work like top-level
require.)  The particular bug you point out in that message only
happens with two implicit requires, and as I discussed further down in
my message, I think that should still be an error.  But I don't see
why a local definition (or an explicit require by name) should
conflict with an implicit require.

By the way, the original question in that thread was why requiring
SRFI 19 doesn't override symbols from the mzscheme language.  Perhaps
the module language require (i.e. the second argument to "module")
should be a fourth level of precedence, lower than all other implicit
requires.

--dougorleans at gmail.com


Posted on the users mailing list.