If I'm not mistaken, the canonical magic cookie for a script
interpreter is `#! /', with a space, i.e.:
#! /usr/bin/perl -w
So we'd want to handle that case as well.
I'm unhappy with all of the conventions I've seen for handling this
matter. It feels as if we've painted ourselves into a corner. To my
knowledge, no other scripting language in common use requires any
special syntax for #! interpolation, such as the #! ... !# block
comment syntax introduced by SCSH. That kind of means that our
current convention is a wart.
I'd be more comfortable if we could adopt something like:
#! as the first two characters in a file represent
a comment until end-of-line.
... with some appropriate backward compatibility to handle the #! ... !#
syntax that we presently use. Then we could adopt the same
argument-processing mechanisms as existing Unix interpreters. I think
that if we make the script invocation much more complex than this, it
will discourage people from using Guile -- it's a minor inconvenience,
but feels very unwieldy.
I don't have any strong opinion about how #! should be handled
elsewhere in a Guile program. It would be nice if we could invent
some meaning that would be consistent throughout the language, but I
prefer scripting convenience to consistency for this case.
These comments need to be tempered by the fact that I haven't had time
to do anything with Guile for about six months, so I am basically
providing opinions without doing anything useful about them. Sorry
about that.
-- T.
-- Answers to Frequently Asked Questions: 1. Morgan James Nicholas Pierce. 2. 7 pounds, 12 ounces. 3. http://morgan.rootsweb.com/