Needless to say I didn't connect.
And if you do know the difference, which most will, it's worth knowing the standard terms. There's only two of them, and it won't take long to commit them to memory.
(You could also say something like "parameter value"... VC++ calls parameters "formal parameters" and arguments "actual parameters", for example.)
http://stackoverflow.com/questions/156767/whats-the-differen...
"Summary"
"The general consensus seems to be that it's OK to use these terms interchangeably in a team environment. Except perhaps when you're defining the precise terminology; then you can also use 'formal argument/parameter' and 'actual argument/parameter' to disambiguate."
There are also distinctions that only exist for someone to flout[1] their superior knowledge of the technical terms. That is a social status issue, not a matter of precision.
Best example of that case would be collective nouns: "oh gosh, you're supposed to say a "crash" of rhinos; you can't just say a "herd" or "bunch"! ~adjusts monocle~
Best example of "precision matters and can cause confusion" would be "literally" or "biweekly". It causes confusion when people can't rely on X-weekly meaning "X per week" or "every X weeks". You would be majestically justified in prodding people to stick to the same convention to avoid confusion.
But there any scenarios where "signature vs invocation" actually matters to the point that you would do the wrong thing as a result of someone ignorantly flipping the terms? The only thing I can think of would be if someone said, with no other context, "change the parameters to fix the bug".
[1] I know, it's "flaunt", not "flout". That's the point: they don't compete for the same semantic use cases, so they don't cause confusion.
You might think to yourself "Surely this parameter/argument thing is such a fundamental bit of terminology that it would apply to all languages?", to which I'd point out that there's an entire paradigm to which this distinction doesn't, strictly speaking, apply: Concatenative languages. Further, in Perl 5, functions and methods don't really have "parameters" at all. (Prototypes permit some optional, complicated, and generally not used stuff.) Also, in a language that permits equational reasoning it's not clear to me that the distinction has the same meaning, though I'll concede that's a more subtle point.
I'm not aware of very many terms that can be strictly applied across all languages. Even something as innocuous as "int" has significantly different semantics in different languages (does it roll over or transparently upgrade to a BigInt?). You could call it a "machine int", perhaps, but that terminology isn't necessarily what I'd call "common use" even if most people will know what you mean.
It might not lead to something being done incorrectly, but I do think it can make communication easier. My initial opinion was that the author was being pedantic, but the above example changed my mind. I've actually had conversations where this distinction would've made everything simpler.
If the speaker used argument or parameter incorrectly, the context would make the intention very clear. Most listeners would make the correct mental association without even thinking about it.
function foo(a, b, c) {
return parameters;
}
would return ['a', 'b', 'c']int main (int argc, char argv)
public static void main(String[] args)
static void Main(string[] args)
sys.argv
Wait a minute...
> argument n. 1. (of a function) an object which is offered as data to the function when it is called.
> parameter n. 1. (of a function) a variable in the definition of a function which takes on the value of a corresponding argument (or of a list of corresponding arguments) to that function when it is called, or which in some cases is given a default value because there is no corresponding argument.
What you describe are the two possible ways of defining special variables, which are more like program parameters.
[1] http://www.lispworks.com/documentation/HyperSpec/Body/26_glo..., http://www.lispworks.com/documentation/HyperSpec/Body/26_glo...
Personally, I prefer the softer explanation in Wikipedia that begins, "The terms parameter and argument are sometimes used interchangeably, and the context is used to distinguish the meaning."
https://en.m.wikipedia.org/wiki/Parameter_(computer_programm...
https://en.wikipedia.org/wiki/Parameter_(computer_programmin...
In the end, I don’t think any term is used consistently enough. People will use whichever words they want, and you have to treat them all as potentially referring to the same thing.
Consequently, speaking of “passing a parameter” is dead wrong most of the time, except maybe when you're writing a function that “defines” other functions, where a parameter of the function to be defined is an argument of the definer function. But I will stop here before it gets complicated.
Let's say: "Here we define a function f(x,y) of two arguments x and y.."