DEV Community

Cover image for Does it bother you when programmers use the word "Arguments" and "Parameters" interchangeably ?
Bek Brace
Bek Brace

Posted on

Does it bother you when programmers use the word "Arguments" and "Parameters" interchangeably ?

Discussion (39)

Collapse
ben profile image
Ben Halpern

I don't think I've ever been bothered by this, but sometimes a statement like this can trigger more awareness πŸ˜….

I think I generally use the two words correctly, but I don't give it much thought and could easily have used them synonymously at times.

For anybody who doesn't know the difference:

- Function parameters are the names listed in the function's definition.
- Function arguments are the real values passed to the function.
- Parameters are initialized to the values of the arguments supplied.
Enter fullscreen mode Exit fullscreen mode

Remember, it's okay to be annoyed β€” but don't be a jerk about it if you need to correct someone.

Collapse
bekbrace profile image
Bek Brace Author • Edited on

I myself use them interchangeably although I know it's wrong :D, however I try to be very careful when I'm doing my YouTube tutorial videos, I try to be as accurate as I can.

Collapse
eljayadobe profile image
Eljay-Adobe • Edited on

In general, no.

If the discussion topic is important to talk distinctly about arguments (provided by the caller) and parameters (as expected by the function) then it's important to mind the Ps and Qs.

Mnemonic: parameters are like parking spots; arguments are like automobiles.

Collapse
bekbrace profile image
Bek Brace Author

a very cool analogy :D

Collapse
etienneburdet profile image
Etienne Burdet

I'm in the same boat, 99% percent of the time, we know what we're talking about anyways and most sentences you can make will actually be true for both arguments and parameters.

Collapse
natescode profile image
Nathan Hedglin

I've heard arguments against it but depends on the parameters of the conversation.

Collapse
bekbrace profile image
Bek Brace Author

that's a cool one, Nate ! :D

Collapse
fjones profile image
FJones

Not at all. Because it ultimately doesn't matter, unless we're talking about specifics of which side we're talking about.

Does it matter if you're working with arguments in the function, or passing parameters to the function? No. It matters when the distinction matters. It matters when discussing, f.e. pass-by-value in languages where non-scalars are implicitly passing references (and even then, does it really matter?).

Collapse
bekbrace profile image
Bek Brace Author

totally true!

Collapse
adam_cyclones profile image
Adam Crockett

Is it params of a function signature and args for a function call? I write a lot of docs that's the only place it bothers me otherwise I don't mind

Collapse
bekbrace profile image
Bek Brace Author

"params of a function signature and args for a function call" - Thanks Adam, I'll memorize that :D

Collapse
adam_cyclones profile image
Adam Crockett

I'm sure there's some way to make it more memorable 😜

Collapse
lionelrowe profile image
lionel-rowe

Is there ever a situation where there would be meaningful ambiguity between which one was meant? If not, why should it bother anyone?

Collapse
bekbrace profile image
Bek Brace Author

I use both terms interchangeably, and i feel dumb sometimes for doing that :D but after a while, i found out that it's not important at all as long as the code is working!

Collapse
andrewbaisden profile image
Andrew Baisden

Not really because I make the same mistake sometimes πŸ˜…

Collapse
bekbrace profile image
Bek Brace Author

same here :D

Collapse
rollergui profile image
Guilherme

this thought always hits me when I say one of them, thinking if it should be the other one haha but thanks to this discussion, I've learned the correct definition.. Now maybe I won't get it wrong so much

Collapse
bekbrace profile image
Bek Brace Author

Great ! And you're not alone with this problem hehe

Collapse
jsn1nj4 profile image
Elliot Derhay

I can get like that, although I try to keep it to myself and just use the correct terms when I'm talking about them. It's easy to forget this is just one of the many small things everyone needs to learn eventually, like literally every other concept and term.

Collapse
chadalen profile image
Chad Adams

No doesn’t bother me at all because if you say either argument or parameter another developer is gonna know what you’re talking about haha

Collapse
juniordevforlife profile image
Jason F

I am guilty of doing this πŸ˜’

Collapse
bekbrace profile image
Bek Brace Author

Me too, my friend :D

Collapse
citizen428 profile image
Michael Kohl

I think I mostly use them correctly, though it’s easy to get sloppy at times. If you need a mnemonic, β€œarguments are for (function) application”.

Collapse
ingosteinke profile image
Ingo Steinke

Not as much as people mixing up attributes and properties.

Collapse
mhalano profile image
Marcos Alano

Very interesting. I think this also applies to shell commands.

Collapse
bekbrace profile image
Bek Brace Author

like for instance .. ?

Collapse
mhalano profile image
Marcos Alano • Edited on
Thread Thread
bekbrace profile image
Bek Brace Author

cool!

Collapse
ashrafkvt profile image
Ashraf kvt

This one sounds very familiar

Collapse
dvddpl profile image
Davide de Paolis • Edited on

I never bothered myself in what I am using... Actually I never really paid too much attention to that. I think I use params all the time.
Always considered them kind of the 2 faces of a medal. Does it really make a difference how we call them?

Anyway. Checkbox "today I learned" ticked! Thank you :-)

Collapse
zperk13 profile image
Zachary Perkins

Wait... they're not synonymous?

Collapse
flawedvice profile image
Vicente Aranda

I used to get confused a lot when started to learn web dev. I also had problems with HTML attributes and JS properties as I didn't know which meant what πŸ˜…

Collapse
moopet profile image
Ben Sinclair

TIL "_argv" is short for "parameter value". Got it.

Collapse
grahammorby profile image
Graham Morby

Not really - you should hear some of the names I've heard for curly braces

Collapse
cyph3r57 profile image
cyph3r57

it doesn't bother me, but sometimes it can generate misunderstandings

Collapse
satyamr123 profile image
Satyam Rajvanshi

No not really

Collapse
asayerio_techblog profile image
OpenReplay Tech Blog

My own mnemonic: "Parameters are Potential, Arguments are Actual".

Collapse
zabdeldjallil profile image
Zitouni Abdeldjallil

Nah that's fine am more bothered when a manager tries to debug something and start telling you that it's simple using some obsolete terms

Collapse
wadecodez profile image
Wade Zimmerman

Absolutely not!

Synonyms are different words that mean pretty much the same thing. The words are close enough that everyone knows what you are talking about. Arguments, parameters, variables, factors, input, etc. are all interchangeable words.

Real devs only care about the code. Word analysis is the job of poets and lawyers.