all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "James K. Lowden" <jklowden@speakeasy.net>
To: help-gnu-emacs@gnu.org
Subject: Re: history of argv (was: Re: How to do a massive unfill paragraph operation over several hundred files?)
Date: Sat, 29 Sep 2018 17:20:00 -0400	[thread overview]
Message-ID: <20180929172000.8ad18945efea9ef7de6c82a3@speakeasy.net> (raw)
In-Reply-To: 86sh1s33xn.fsf_-_@zoho.com

On Sat, 29 Sep 2018 14:04:36 +0200
Emanuel Berg <moasen@zoho.com> wrote:

> BTW I always thought, without thinking about
> it, that "argv" is a convention in and from the
> C programming language!
> ...
> Or argv may trace its origin to yet some other
> language or piece of technology!

It's a little difficult to disentangle C from Unix, but the argv
convention owes more to Unix than to C.  

ISO C distinguishes between freestanding and hosted environments.  
main()  is defined only in a hosted environment, and the names of the
arguments are not defined.  So, fair to say, argv is a C convention but
not defined by C.  

Unix on the other hand defines its exec(3) family of functions.  Any
program thus invoked is provided an array of pointer-to-char and the
length of that array.  The documentation for exec(3) typically refers
to the array as argv.  

It's hard to overstate the effect Unix had on other operating systems
and programmer expectations.  Would MS-DOS or even VMS support argv, but
for the influence of Unix?  Not C, certainly; C didn't dominate the
landscape in 1980 as it does now.  That was the era of ADA,
Modula-2, Turbo-Pascal, and "4th generation" languages.  And Cobol, of
course.  

C is the native API for Windows, but the Windows entry point
(conventionally, "WinMain") isn't provided with argv.  It's given the
command line verbatim; parse it as you will.
https://msdn.microsoft.com/en-us/library/windows/desktop/ms633559
(v=vs.85).aspx

No landscape is more alien to C than IBM, and argv on IBM systems is
round peg in a square hole.  Cf. IMS and CICS at:

https://www.ibm.com/support/knowledgecenter/en/SSLTBW_2.3.0/com.ibm.zos.v2r3.cbclx01/comlin.htm.

Coming back on topic, there's no small intersection between the Unix and
elisp communities.  When the need arose to name the array of strings
passed to the exec'd program, it's little wonder it got named "argv".  

--jkl


  parent reply	other threads:[~2018-09-29 21:20 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.1463.1538170475.1284.help-gnu-emacs@gnu.org>
2018-09-29 11:32 ` How to do a massive unfill paragraph operation over several hundred files? Emanuel Berg
2018-09-29 12:04   ` history of argv (was: Re: How to do a massive unfill paragraph operation over several hundred files?) Emanuel Berg
2018-09-29 12:44     ` Skip Montanaro
2018-09-29 23:20       ` John Yates
     [not found]       ` <mailman.1503.1538263274.1284.help-gnu-emacs@gnu.org>
2018-09-30 18:20         ` Emanuel Berg
     [not found]     ` <mailman.1481.1538225108.1284.help-gnu-emacs@gnu.org>
2018-09-29 15:14       ` Emanuel Berg
2018-09-29 18:07       ` Barry Margolin
2018-09-29 21:20     ` James K. Lowden [this message]
2018-09-30 19:47   ` How to do a massive unfill paragraph operation over several hundred files? Gerald Wildgruber
     [not found]   ` <mailman.1577.1538336869.1284.help-gnu-emacs@gnu.org>
2018-09-30 20:28     ` Emanuel Berg
2018-10-01  5:48       ` Gerald Wildgruber
     [not found]       ` <mailman.1589.1538372941.1284.help-gnu-emacs@gnu.org>
2018-10-01  9:42         ` Emanuel Berg
2018-10-01 14:37           ` Gerald Wildgruber
2018-10-01 15:21             ` Robert Pluim
2018-10-02 12:11               ` Gerald Wildgruber
2018-10-02 15:37                 ` Noam Postavsky
2018-10-03 10:11                   ` Gerald Wildgruber
2018-10-03 23:52                     ` Noam Postavsky
2018-10-08  5:42                       ` Gerald Wildgruber
     [not found]                   ` <mailman.1666.1538561477.1284.help-gnu-emacs@gnu.org>
2018-10-03 14:12                     ` Emanuel Berg
     [not found]               ` <mailman.1650.1538482287.1284.help-gnu-emacs@gnu.org>
2018-10-02 15:11                 ` Emanuel Berg
     [not found]           ` <mailman.1626.1538404685.1284.help-gnu-emacs@gnu.org>
2018-10-01 15:12             ` Emanuel Berg

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=20180929172000.8ad18945efea9ef7de6c82a3@speakeasy.net \
    --to=jklowden@speakeasy.net \
    --cc=help-gnu-emacs@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.