3 ms·
On a super pedantic level, "parameters" are the names that you write in the function definition, and "arguments" are the values you pass as parameters. def n
by steveklabnik 7y ago
On a super pedantic level, "parameters" are the names that you write in the function definition, and "arguments" are the values you pass as parameters.
def name_length(person)
steve = Person.new
name_length(steve)
Here, 'person' is a parameter, and 'steve' is an argument.
Most programmers use them interchangeably.
- learc83 7y agoWe called those 2 terms "formal parameters", and "actual parameters" if I remember my programming language concepts class from college correctly.
- sdegutis 7y agoI've never been to programming college but in 10 years I have always heard them as def(parameters) and call(arguments). Probably a lot of that was when reading about how VMs and compilers work, though.