[R6RS] libraries

dyb at cs.indiana.edu dyb
Tue Dec 13 10:15:58 EST 2005


> By "totally immutable", do you mean to disallow even the exporting 
> module from mutating its own exported variables?  Or do you mean the 
> option you described earlier, "set! has to appear in the residual code 
> (post macro expansion) of the body of the exporting module."
>
> I'm in favor of the latter.  It prevents the problem raised by the 
> example you've just given, and in general, it should prevent external 
> mutation of variables which the exporting module did not intend to allow 
> to be mutated.  This seems to me a good rationale for this particular 
> interpretation of "settable only by the exporting module".
>
> Anton

I prefer the former, i.e., neither exporting module nor importing module
can modify the binding.  It's easier to understand and implement, and as
Richard Kelsey observed some time back, it allows one to determine which
bindings are settable in a module merely by reading that module's code.
It also simplifies automatic program analysis.  I'll go along with the
latter, however, if that's the concensus.

Kent


More information about the R6RS mailing list