[r6rs-discuss] on rational 6.7 Compund library names
AndrevanTonder wrote:
> Local imports: Should shadowing take place in either of the two
> imports below?
> With e.g. Oleg's solution, shadowing would take place due to at least
> one, and
> maybe both, let-bindings.
>
> (let ((r6rs 1)
> (base 2))
> (local-import (r6rs))
> (local-import (r6rs base))
> ....)
The assumption in the example I gave was that in an expression like
(local-import (---)), it would make sense to treat the --- as literal
names. A non-literal reference to a library could then be represented
by replacing the (---) with a single identifier, and that identifier
would have previously been bound to a suitably constructed value. So in
the above, no shadowing would occur.
> Local libraries: Assuming they have compound names also, presumably this
> could be made to shadow, but it would require an extension to the
> expander so that
> it can bind not only identifiers but compound objects:
>
> (let ()
> (library (r6rs base) ------)
> (local-import (r6rs base))
> ----)
I think Mike's point is a good one: a local module has different naming
requirements from top-level libraries. In general, local module-like
capabilities may end up being somewhat orthogonal to the current library
mechanism. PLT's units mechanism provides a kind of example of this.
Anton
Received on Wed Jun 27 2007 - 14:00:28 UTC
This archive was generated by hypermail 2.3.0
: Wed Oct 23 2024 - 09:15:01 UTC