Why 'argument'?
December 13, 2007 9:31 PM   Subscribe

Why do mathematicians (and/or programmers) describe information passed to a function as an 'argument'?

I'm learning PHP (slowly) but find myself hung up on one small piece of terminology, 'argument'. I keep expecting an argument to be a proof, or an equation, or something that says or does something or refuses even to do something. And yet, it's just a value. So I'd like to understand why it has that name, and then I can move on. I hope.
posted by b33j to Technology (14 answers total) 8 users marked this as a favorite
 
Not to be too obvious, but could it be in the sense of a direct object to a transitive verb?
posted by phrontist at 9:39 PM on December 13, 2007 [1 favorite]


I recently started learning how to program in C++, and the argument thing is kinda weird (and in C++, as far as the function is concerned, those same values are "parameters"--like I might write a function that has 2 parameters, an integer and a decimal number, and then when I'm writing the program, I send 2 arguments, like 5 and 2.6). I just tried to not get caught up too much in semantics, though--that's what it's called, but as you said, in reality it's just a number. Unless PHP requires you to know that arguments are those values you pass to functions, I wouldn't worry too much about it. The only reason I had to know that stuff at all was for the test. Eventually you'll be doing it and you'll just say "oh yeah, I need to put 2 arguments in this function call".

Hope that helps a little--in short, don't worry as much about the terms and worry more about what they do.
posted by DMan at 9:42 PM on December 13, 2007




Yeah, it appears to be more related to Verb arguments.
posted by Green With You at 10:30 PM on December 13, 2007


IIRC, the origin of the term in computer programming is actually complex analysis, in which the "argument" is the angular portion of a complex number if you think of it in polar coordinates. As it happens, that's also the number that you pass to trig functions like sin() and cos(), and it generalized from there to mean any value that gets passed to a subroutine.

This etymology might be wrong, but even if it's true it only pushes the question back one level— why do mathematicians refer to that θ as the "argument"? I don't know.

You could try searching the alt.folklore.computers archives to see if someone else has tracked this down in more detail.
posted by hattifattener at 10:30 PM on December 13, 2007


Best answer: In terms of computer langauges, it has been used in this way since Fortran at least (the 1950s) which I'm sure borrowed directly from the same sense of the word in mathematics, which goes back centuries (to at least Euler) as far as I can tell.

The best guess I can put forward is that the arguments of a function (in the mathematical sense) completely determine its output -- if you know the value all the arguments you know for sure the value of the function. The latin verb arguere means "to put in clear light; to declare", so this reflects the fact that if you know the values of the arguments then you can compute the value of the function; they put it into clear light.
posted by Rhomboid at 10:35 PM on December 13, 2007 [1 favorite]


This is a good question. I've read a bunch of dictionary definitions and pondered it and the best reasoning I can come up with is that it means "argument" in the sense of an assertion. The function is going to evaluate its argument in the same way that a person would evaluate a rhetorical argument or assertion.
posted by XMLicious at 10:37 PM on December 13, 2007


In a lot of cases the terms used for things are chosen arbitrarily, with little regard for prior usage, or in some cases for humorous reasons.

For example, a computer "joy stick" is a term stolen from aircraft designers, who used the term to refer to the control stick on old-style biplanes. And that use of the term turned out to be a phallic reference.

Technical people in all fields do this. It isn't just us computer nerds.
posted by Steven C. Den Beste at 10:38 PM on December 13, 2007


I think of it the way Rhomboid's best guess goes. Affixing an argument to the function is kind of arguing for a particular output value out of all the function's possible outputs.
posted by juv3nal at 10:48 PM on December 13, 2007


Best answer: There's a great website for the earliest known use of words in mathematics. In this case, it cites a published example from Gompertz in 1825, but I'm guessing it was in use before English was a common language in which to do math. Rhomboid's explanation strikes me as right. In the sense of "a statement to influence reasoning," the word "argument" goes back well past Chaucer, and it seems not ridiculous to say that it's the number which determines the outcome of a given function.
posted by Schismatic at 11:03 PM on December 13, 2007 [2 favorites]


I'd like to preface this with the statement that I don't know the answer.

As a mathematician, I agree with Steven C. Den Beste. These things are often chosen somewhat arbitrarily. Sometimes names can be evocative, but really what is important is that there is a specific definition attached to the word.
posted by number9dream at 11:51 PM on December 13, 2007


In this case, it cites a published example from Gompertz in 1825 ...

Only 1825? The OED cites an example from Chaucer (c. 1386) under the following definition: "Astr. and Math. The angle, arc, or other mathematical quantity, from which another required quantity may be deduced, or on which its calculation depends." The etymology is pretty much that given by Rhomboid, above.

So maybe it would help to think of it this way: if you want to find foo, and I give you the argument of foo, then you can argue that foo takes on such-and-such value.
posted by Johnny Assay at 7:13 AM on December 14, 2007


Yeah, Rhomboid and Schismatic have it. The basic sense of argue is, in the OED's words, "To prove or evince; to afford good ground for inferring, show weighty reasons for supposing; to betoken, indicate. (Passing from prove in early use to evidence or imply in modern use.)" Hence an argument is a quantity "from which another required quantity may be deduced."

Note to SCDB and number9dream: "I don't know or care about the answer to your question, so why should you?" is not a helpful response in AskMe.
posted by languagehat at 7:34 AM on December 14, 2007


I had to work out the difference between "parameter" and "argument" a few years ago, and what I settled on is that parameters are what could be passed in to something, and arguments are what was actually passed in.

To use a shell script analogy:

Usage: myscript.sh [-a] [-b] [-c filename]

has three parameters, but the actual invocation

myscript.sh -a -c foo.txt

has two arguments.
posted by mdoar at 8:58 AM on December 14, 2007


« Older Car vs SUV rental for winter driving?   |   How can I tone down my red lips? Newer »
This thread is closed to new comments.