j kalbhenn <[email protected]> writes:
> scripts of other languages usually need just one line to specify the
> interpreter:
>
> #!/usr/bin/myinterpreter
>
> but with guile we have to add a final !#
>
> #!/usr/bin/guile !#
The shebang above does not work, because the "!#" is interpreted by the
kernel as an argument to pass to Guile before the script file name, and
then Guile interprets it as a file to load. Unless "!#" is a file in
the current directory, this will fail, or at least it does for me.
> or even
>
> #!/usr/bin/guile -s
> !#
>
> in my opinion, this is not ideal. from my perspective as a guile user
> this seems to be unnecessarily inconsistent and complicated.
There are advantages to the current approach, but regardless of what our
opinions might be about this, I don't see how we could change this now
without breaking a great many Guile scripts. Since the earliest days of
Guile, "#!" has been comment syntax that terminates with "!#", and many
Guile scripts depend on this.
For example, it is quite common to put a shell script between #! and !#
that ends by running Guile on the same file. It is also quite common to
put "-*- scheme -*-" on the second line to that Emacs will recognize the
type of the file.
Mark