[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Scheme-reports] 6.7.4 load



The 'load' procedure doesn't specify what should happen when it is 
called from with a module. While it is clearly meant to be used at the 
top level of a program or in an interactive REPL, as specified it may be 
also used from within a module. In that case, in which environment is 
the content of the file evaluated? Are bindings created by the file 
visible to code in the module? What if the file contains module 
definitions or happens to redefine existing bindings? etc etc

Perhaps the contents should always be evaluated in the 
interaction-environment. Or that could be a default and 'load' could 
take an optional argument that specifies an environment.

Or, if these questions are too thorny, the spec should probably 
explicitly leave unspecified the effect of calling 'load' from within a 
module. While the spec does say 'load' is implementation-dependent, I 
think most schemers take that to mean that some implementations may 
'load' source files, while others may 'load' compiled files. Therefore, 
language like the following should be added:

"The effects of calling 'load' from within the body of a module are 
unspecified."

Thanks,
Jon
-- 
Jonathan Kraut
NYC
jak76@x

_______________________________________________
Scheme-reports mailing list
Scheme-reports@x
http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports