[R6RS] Re: modules

R. Kent Dybvig dyb
Tue Aug 31 02:08:07 EDT 2004

> If EVAL is permitted to evaluate code in a module ...

I have been assuming that a program would be able to construct a module
definition and call eval on it, just as a program can currently construct
an arbitrary r5rs program and evaluate it.  Is everyone else assuming
that this will not be possible?  The (eval `(lambda () (foo ,v))) was
just a simple abstraction of the issue of what happens if a program
constructs and evaluates a module and the constructed module contains a
pointer to a large data structure, nested within a syntax-rules template.

> As Will said, scanning for implicit exports is entirely optional.
> It is correct, if conservative, to assume that all top-level
> identifiers are exported.

Of course I know that a compiler can fall back to "all module bindings
are exported".  In fact, this is where it *must* fall back to if it
fails to completely scan of any part of any syntax-rules template.
My point was that avoiding this fate is difficult, i.e., complex and/or
potentially expensive.  This is most likely to be a big problem only for
large and complex modules, but those are the ones most in need of static
analysis for all the reasons humans and computers do static analysis.


More information about the R6RS mailing list