[plt-scheme] On PLaneT packages and compatible upgrades

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

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?

I like Java's conflict resolution model.  Local type names (defined in
the current package) have highest preference, then names imported with
single-type-import declarations, such as

   import foo.bar.baz.Garply;

then names imported with type-import-on-demand declarations, such as

   import foo.bar.baz.*;

Translated to PLT Scheme, this would mean that symbols defined in a
module have precedence over symbols required by that module, and
symbols that are required explicitly (with "only" or "rename") have
precedence over symbols required implicitly.

--dougorleans at gmail.com

Posted on the users mailing list.