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.
Remember, it's okay to be annoyed — but don't be a jerk about it if you need to correct someone.
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.
How’s it going, I'm a Adam, a Full-Stack Engineer, actively searching for work. I'm all about JavaScript. And Frontend but don't let that fool you - I've also got some serious Backend skills.
Location
City of Bath, UK 🇬🇧
Education
11 plus years* active enterprise development experience and a Fine art degree 🎨
How’s it going, I'm a Adam, a Full-Stack Engineer, actively searching for work. I'm all about JavaScript. And Frontend but don't let that fool you - I've also got some serious Backend skills.
Location
City of Bath, UK 🇬🇧
Education
11 plus years* active enterprise development experience and a Fine art degree 🎨
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?).
Ingo Steinke is a Berlin-based senior web developer focusing on front-end web development to create and improve websites and make the web more accessible, sustainable, and user-friendly.
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.
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.
Oldest comments (37)
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:
Remember, it's okay to be annoyed — but don't be a jerk about it if you need to correct someone.
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.
Very interesting. I think this also applies to shell commands.
like for instance .. ?
stackoverflow.com/questions/364956...
cool!
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
"params of a function signature and args for a function call" - Thanks Adam, I'll memorize that :D
I'm sure there's some way to make it more memorable 😜
Not really because I make the same mistake sometimes 😅
same here :D
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?).
totally true!
Not as much as people mixing up attributes and properties.
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
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.
a very cool analogy :D
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.
Wait... they're not synonymous?
Some comments may only be visible to logged-in visitors. Sign in to view all comments.