guile-devel
[Top][All Lists]
Advanced

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

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


From: Rob Browning
Subject: Re: Command line processing opens up can of worms :>
Date: 29 May 2001 00:23:04 -0500
User-agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7

Marius Vollmer <address@hidden> writes:

> 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.

I guess I'd tended to think that anyone using guile wouldn't really
need much explanation of read, but perhaps not.

> Using quotes requires by-hand-parsing, but I don't think it would be
> overly fancy.

I guess the only thing we have to do is to make sure and handle \\ and
\" properly, but doesn't that require some ugly escaping in even
common cases?  Say you wanted to tell guile to print

  "hello all"

followed by the newline, including printing the quotes.  How would you
do that?  I guess you would have to say:

  #!/usr/bin/guile \
  -x "(display \"\\\"hello all\\\"\n\")"
  !#

That seems kinda awkward.  Though I guess it is more consistent with
what they'd have to do from a shell.

However, I think I still prefer the read/write-to-string version a bit
better since it'll support the above, but also the simpler version
below, but perhaps it has it's own bits of awkwardness that I just
haven't figured out yet:

  #!/usr/bin/guile \
  -x (display "\"hello all\"\n")
  !#

I don't know, really.  I'm happy with changing my code to do whichever
people prefer.

-- 
Rob Browning <address@hidden> PGP=E80E0D04F521A094 532B97F5D64E3930



reply via email to

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