[R6RS] Scripts and toplevel code

Anton van Straaten anton at appsolutions.com
Thu Aug 17 14:18:38 EDT 2006


Michael Sperber wrote:
> Anton van Straaten <anton at appsolutions.com> writes:
> 
> 
>>Because with other kinds of code, it's possible to use 'import' and
>>access the definitions exported by that code.  It seems fairly unusual
>>to me to have a class of code that has no defined way of being
>>accessed programmatically from within the language, short of spawning
>>a shell.
> 
> 
> Whatever the highest level is from where you can import the other
> stuff, you're going to have the problem that it's not clear how to get
> code *there*.  Suppose you have a "load-script" procedure or
> "import-script" clause or something---you still don't know how to run
> the code that uses it.

I'm not sure I understand -- are you saying that without a defined entry 
point, or some other protocol for executing a script, just being able to 
load scripts isn't enough (depending on what "load" means)?

If so, I agree, but I was addressing a more basic problem than the one I 
think you're concerned with.  Given how we voted today, we now have the 
situation where scripts are anonymous, and R6RS doesn't (yet?) specify 
anything like load-script.  This is the exact situation that I was 
describing in the quote above: code that cannot be loaded, executed, or 
otherwise referenced programmatically.

A load-script procedure would address this basic concern.  Whether or 
how that addresses running the loaded code, I see as a separate 
question, which could be addressed as part of the specification of 
load-script, and/or as Kent suggested, with an additional procedure such 
as "run-script".  Load-script seems quite similar to the R5RS "load", 
and it would plug the hole that I was pointing to, even if it doesn't 
provide total controllability for arbitrary scripts.

Anton



More information about the R6RS mailing list