Am Mo., 16. März 2020 um 23:05 Uhr schrieb Shiro Kawai <xxxxxx@gmail.com>:
On Mon, Mar 16, 2020 at 11:31 AM Marc Nieper-Wißkirchen <xxxxxx@nieper-wisskirchen.de> wrote:

In general, `foo' is not known at the call site or `foo' is defined in some other module, for which no compile-time information is available. 

Why?  It is just as good as procedure inlining.  In R6RS the compiler can know an imported bindings won't be altered at runtime; in R7RS we need to interact with some implementation-specific convention.  In either way, the compiler can keep information about the bound value; only the "constantness" of the binding is needed to look it up.

In general, the final binding of an identifier in an R[67]RS library is not known until a library is "invoked" (in the sense of "Implicit Phasing for R6RS Libraries by Dybvig/Ghuloum). The invocation happens when the main program is run, which is after the program has been compiled.  I'm not saying that the compiler cannot deduce the binding for the most common cases, but, in general, it can't.

In any case, in this regard there is no difference between CL-style keywords and property lists.
 

In R7RS, macro is the only portable way to declare such "constantness" (by which I mean the compiler knows
the binding of an identifier won't be altered).    An implementation may have other means (Gauche has a few).
define/kw macro may hide such differences.

One can read the last paragraph of section 5.2 of the R7RS-small in such a way that the exporting library mustn't alter the binding of an exported identifier after it has been imported by some other library or the top-level program.