John, I don't think that what you have commented about is related to
what we have been discussing (unless I misunderstood you).
Ah. Yes, I misunderstood.
What I have
been discussing with Jim lately is the following: If a library exports
an identifier `foo', one can access all (not renamed) identifiers that
are defined at the top-level of the library, namely through
(datum->syntax #'foo top-level-identifier-name) or a similar
construction for the given macro system that allows unhygienic
bindings. Therefore, not only the set exported identifiers but also
the top-level environment of a library is an observable quantity.
I tried this in Guile with an R6RS library that defines trivial procedures foo and bar and exports foo. Evaluating (datum->syntax #'foo 'bar) gives me #<syntax bar>, but I do not see how to invoke the procedure bound to bar. Furthermore, if I try it with baz instead of bar, I get #<syntax baz>, pretty much indistinguishable. So it is not leaking even the names of top-level bindings, never mind their values. The same is true in Chez.