[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: guile -s is it necessary?
From: |
tomas |
Subject: |
Re: guile -s is it necessary? |
Date: |
Wed, 16 Oct 2002 09:51:03 +0200 |
User-agent: |
Mutt/1.3.24i |
On Tue, Oct 15, 2002 at 04:40:01PM -0500, Rob Browning wrote:
> address@hidden writes:
>
> > Note that the second form is not only convenient on the
> > command line but also simplifies your trustworthy hash-bang
> > line. As far as I know, unadorned arguments are not yet
> > used in guile, so this would be a backward-compatible
> > embellishment/enuglyment.
>
> What about things like:
>
> guile -s foo.scm arg-to-foo another-arg-to-foo
Hmmm. First non-option argument would be the script name,
the rest is passed to it (the script) as arguments (that'd
mean that you must pass guile-specific switches *before*
the first non-option argument. This would again match the
two BigPee's behaviour, whether this be considered a Good
Thing or not ;)
> or
>
> guile -e main -s foo.scm arg-to-foo another-arg-to-foo
Both BigPee's know a switch like that for an expression to be
evaluated. Perl (-e) takes several of them and a script on top
of that, Python just one (-c) and terminates options processing
(matching the more cautious nature of Pythoners in general ;^)
I think guile's -e is special in that it is `out of order',
first loading the script and then calling the function passed
as argument; so the more exact correspondend to Perl's -e and
Python's -c would be guile's -c -- but that wouldn't change
the `syntax' of the command line.
Thanks
-- tomas