all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: David Kastrup <dak@gnu.org>
To: rms@gnu.org
Cc: emacs-devel@gnu.org
Subject: Re: A not quite stylish proposal for command line processing
Date: Tue, 31 Jul 2007 07:59:27 +0200	[thread overview]
Message-ID: <85wswh3ygw.fsf@lola.goethe.zz> (raw)
In-Reply-To: <E1IFiZP-0001qq-Vl@fencepost.gnu.org> (Richard Stallman's message of "Mon\, 30 Jul 2007 23\:38\:51 -0400")

Richard Stallman <rms@gnu.org> writes:

>     The problem is that the equivalent (pop command-line-args-left) is the
>     only way to pass strings from the shell or elsewhere without having to
>     requote them as Lisp strings.  (*argv++) might be quite over the top,
>     but at least (pop argv) would still be quite concise, much more
>     Lispish, and it might make it easier for people to actually find the
>     respective variable.
>
> It is a fine method of doing this.  If people really want to do this,
> then let's install some such thing.
>
> However, I am not sure that the name `argv' is useful now
> that even most hackers are not C programmers.  Does any other
> language use the name `argv'?

Perl has @ARGV, awk has ARGV, Python has sys.argv, bash has $@ (well,
you can't always win), Ruby has ARGV, lua has arg, Java has args[]...

The v in argv has not survived into all script languages (though quite
better than argc), but it makes the variable name safer against
accidental reuse in our flat Lisp namespace.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum

  reply	other threads:[~2007-07-31  5:59 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-29 13:07 A not quite stylish proposal for command line processing David Kastrup
2007-07-30 16:44 ` Richard Stallman
2007-07-30 16:52   ` Lennart Borgman (gmail)
2007-07-30 17:11     ` David Kastrup
2007-07-30 17:24       ` Lennart Borgman (gmail)
2007-07-30 16:57   ` David Kastrup
2007-07-31  3:38     ` Richard Stallman
2007-07-31  5:59       ` David Kastrup [this message]
2007-07-31 20:22         ` Richard Stallman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=85wswh3ygw.fsf@lola.goethe.zz \
    --to=dak@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=rms@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.