[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Command line processing opens up can of worms :>

From: Dirk Herrmann
Subject: Re: Command line processing opens up can of worms :>
Date: Tue, 29 May 2001 12:10:13 +0200 (MEST)

On 29 May 2001, Marius Vollmer wrote:

> Rob Browning <address@hidden> writes:
> > At this point, I'm thinking that the simplest semantics that make both
> > the implementation and the understanding straightforward are to just
> > specify that "read" is used to parse all of the arguments after the
> > second line of the script and before the !#, and any non-string
> > arguments are immediately reverted to strings via a "write to string".
> [...]
> The alternative that I can see is to specify a simple form of quoting.
> For example, we can say that in the meta-args lines, arguments are
> separated by whitespace, and that you can use double `"' and single
> `'' quotes to form arguments that include whitespace.  This seems
> simpler and easier to understand than the read-then-write
> specification and doesn't drag in the (longish) definition of Scheme
> read syntax.  It is also more symmetric with the arguments on the
> command-line.

IMO, it is not of much use to provide an additional way of quoting to
emulate shell behaviour.  It may even be confusing, since it will always
be a strange mixture of syntaxes.  Thus, I'd stay with saying, that the
arguments will be read with (read).  We could still require that explicit
quotes would have to be used.

The idea to use the read/write-to-string approach can offer some nice
possibilities, though.  Assume that some program expects a number
parameter, and you would like to pass the constant pi.  Withough this
approach you would have to type "3.14159.." with as many digits as you
remember.  But, using the #, syntax extension, you might just be able to
write #,(pi), and let write-to-string produce a printed representation of
pi with maximum accuracy.

Best regards,
Dirk Herrmann

reply via email to

[Prev in Thread] Current Thread [Next in Thread]