3.2.5.1 How does a client handle scoping clashes?
Patrick D. Logan
Many of the C++ libraries I can think off hand use prefixes in their names. This is essentially an ad hoc solution. (What if two vedors choose the same prefix?) And not very pretty.
[...]
Kim Barrett
This problem was considered and dealt with in the design of Dylan.
Libraries are the place where the regression is terminated.
  • A provider's library contains a define library form that names the modules exported from the library.
  • A client's library contains a define library form that names the libraries that are used, including the modules that are imported.
    (With module renaming allowed, just like variable renaming when importing variables into a module, in order to resolve name conflicts).
While a define library form contains a name for the library, that name isn't actually important. Specifically, the library names in the client's imports don't really have anything to do with the provider's library name. Rather, the association between library names in the client's imports and the provider's product is made in some extra-lingual implementation-defined manner. This mechanism can't really be portable because it necessarily deals with such issues as filesystems and their naming conventions (we could have bumped the problem up to an implementation- defined mechanism for mapping from "generic, portable" filenames to actual filenames, but didn't), and so on.
We intentionally made no attempt to specify the specifics of such a mechanism in order to provide as much latitude as possible to implementors in this area. However, just to make it a little clearer, here are sketches of a couple of possible ways it could be done:
  • Edit a standard configuration file associated with the client library, specifying the mapping from library names used by the client to the filename where the used library is found.
  • Drag and drop the icon for the used library onto the icon for the client library.
All of this is in the DIRM, though perhaps not as obvious as it could be.