3
\$\begingroup\$

This is a question about nomenclature, which I hope is on-topic here on meta. I believe it is: since my last question it became clear to me that answerers here are, above all, educators ("we're teaching people in a lot of ways, helping them and us at the same time"). My background is in life sciences, and because of that I always pay attention to the correct use of the nomenclature and terminology, not because I'm obsessed by nomenclature but because I believe that the correct use of the terms allows us to communicate clearer and avoids misunderstandings — which are very important here at CR.

My issue here is the use of the term parameter. Expressions like "passing a parameter" or "passing a parameter to a function" are quite common: on Google, the search "passing a parameter to a function" (with quotes) returns over a hundred thousand results. Here on CR the search "passing a parameter" (with quotes) returns 14 results.

However, the way I understand it, we can never pass a parameter to a function. We can only pass arguments.

So, given this very basic example (in JavaScript):

function double(number) {
  return number * 2;
};

console.log(double(20))
//returns 40

Here, number is the parameter in that function. It's hardcoded on the function definition: we cannot pass it. What we can pass are the arguments (in this example, 20), which is the value the parameter will assume.

If that's correct, those questions asking about "passing a parameter" (and the answers using the same expression) are not exactly clear, and should be edited.

In conclusion, these are my questions:

  • Am I being too draconian here? Is the expression "passing a parameter" acceptable? Those 100,000 results on Google make me think that it is acceptable.
  • If "passing a parameter" is inadequate indeed, can we suggest edits, changing it for "passing an argument"?
\$\endgroup\$
  • \$\begingroup\$ "Those 100,000 results on Google make me think that it is acceptable." If your neighbour says the snake in your backyard is harmless, do you trust him? What if both your neighbours say it's harmless? Keep in mind: most of the people in your street know nothing about snakes. Don't look at how many people on the internet are wrong. Ask the experts whether there is a problem instead. \$\endgroup\$ – Mast Dec 30 '17 at 14:11
  • \$\begingroup\$ Honestly, I don't think you can pass arguments. A function has arguments or takes arguments. What you pass is whatever the argument is. \$\endgroup\$ – Mast Dec 30 '17 at 14:12
  • \$\begingroup\$ @Mast I understand that, I never accept an argumentum ad populum: most of the people in my street will say that snakes have no legs when in fact all snakes species have 4 legs. That's not the point, the point is that regarding this specific question, since I'm not completely sure, 100000 pages saying otherwise will make me, at least, suspicious. \$\endgroup\$ – Gerardo Furtado Dec 30 '17 at 15:08
  • \$\begingroup\$ Don't forget that passing a parameter and passing an argument are both correct. It's just a matter of convention. \$\endgroup\$ – Bruno Costa Jan 10 '18 at 16:25
  • \$\begingroup\$ @Mast Whether snakes are harmless is a fact about the world. Whether one passes parameters is a fact about language. Since language is determined by people, it's entirely legitimate to look at usage. \$\endgroup\$ – Acccumulation Jan 10 '18 at 23:17
  • \$\begingroup\$ Well, I do miss my original title for the question: it's neither a pun nor a joke, it's actually a Shakespearean reference, and a very famous one, questioning if the name we use to call a thing (the terminology) changes the thing itself. That's my question. It encompasses both future answers and questions. "Correcting existing posts" is only secondary here. \$\endgroup\$ – Gerardo Furtado Jan 10 '18 at 23:36
  • \$\begingroup\$ To be even more pedantic, you can pass a parameter. For example, in def f(x): return g(x)+1, the parameter x is passed to the function g. It's just that the parameter isn't g's parameter, it's f's. \$\endgroup\$ – Challenger5 Jan 12 '18 at 4:54
10
\$\begingroup\$

Reviewers are indeed various degrees of pedantic, so this question isn't completely crazy.

Using the correct words in proper context ensures that we can be understood, and that is the goal of all communications: that the receiver processes the information the way the emitter meant it to be.

In the case of parameters vs arguments, my understanding is that a function's signature defines parameters, and callers of that function give it arguments, which indeed makes the phrase "to pass a parameter" feel wrong... but only when you stop and think about what's being said.

There's something about "passing an argument" that just doesn't roll as nicely as "passing a parameter", I guess; otherwise the "correct" term would be everywhere. Or maybe it's just the age-old confusion between the two that's made "parameter" a more common word than "argument" for it. Point is, either can be used interchangeably and every reader gets the intended meaning: as far as communication goes, there's nothing wrong with "passing a parameter".

So I wouldn't reject an edit suggestion that changes it to the correct wording.

But I wouldn't approve an edit suggestion that only changes that: such petty pedantic edits can too easily escalate into edit/rollback wars - it's not worth it.

My recommendation would be to make such a wording change only when the post you're editing has other, more common problems (typos, insufficient formatting, incorrect syntax highlighting, etc.) widely regarded as justifying an edit all by themselves.

\$\endgroup\$
8
\$\begingroup\$

The original text of a post is valuable because it gives us clues as to the background and level of expertise of the poster, and these help us to judge the way we present the review. For example, a poster who is confused about terminology may be a student or beginner, and this could suggest that it would be best to pitch the review at an introductory level.

"Correcting" terminology in the question would hide these clues and make it harder to pitch the review at the most helpful level for the poster.

In the particular case of passing a parameter versus passing an argument, naïve Google search counts don't seem to show that either is overwhelmingly more common than the other. For example, on scholar.google.com we have:

            passing a(n) ~  pass a(n) ~  passing ~s  pass ~s
parameter              759          790        6640     7280
argument               469          546        3240     3230

Both forms seem common in the literature, and both seem perfectly clear to me, so I would recommend leaving these phrases alone.

Update: Here's an example where a well-intentioned editor attempted to correct some terminology in the question but ended up obscuring the issue. The original post read "arrival time", which was a mistake for "arrival rate", but the editor "corrected" it to "interarrival time" which is still wrong, and also makes it harder to understand how the mistake happened. (I rolled back the edit to undo the "correction".)

\$\endgroup\$
  • \$\begingroup\$ Excellent point about the author's skill level and how terminology edits can mask it. \$\endgroup\$ – Mathieu Guindon Jan 2 '18 at 23:41

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .