[R6RS] Naked scripts

Anton van Straaten anton at appsolutions.com
Tue Aug 8 12:30:34 EDT 2006


Here's the full syntax for the script proposal with my revision 
included.  A script consists of:

   <script header> <script body>

where

   <script header> -> #!/usr/bin/env scheme-script <line break> #!r6rs

   <script body> -> (script <library name> <entry name>)
                    <library>
                  | (script <library name>)
                    <relaxed library body>

Also, as I mentioned, I'd like to consider making #!r6rs optional.

BTW, I realize that the idea of having the nature of the body change 
depending on the presence or absence of <entry name> may be considered 
undesirable.  I'm open to alternatives; this just seemed like a simple 
hook to integrate the additional functionality with minimal changes to 
the rest of the existing proposal.

Also, I looked at the issue of using #!/usr/bin/env vs. a more direct 
invocation.  I like the env approach more now than I did originally, so 
I withdraw my objection to that.  One benefit is that it means that 
scheme-script can be a shell script, which wouldn't be possible on many 
Unixes if it were invoked directly as #!/usr/bin/scheme-script.

Anton



More information about the R6RS mailing list