Given the following line
cat.meow(10, x);
- "meow" is the "function" or "method" being called
10
is the "first argument"x
is the "second argument"
What is cat
called?
I'm dissatisfied with the answer, cat
is called "the object". I want to say I've heard it called the "receiver", but I don't remember where I've heard that.
Considering both 10
and x
can be objects, calling cat
"the object" doesn't help me distinguish this component from the argument components.
This makes it difficult to discuss the various components that makeup a function call.
It is called the “subject” following the subject-verb-object sentence structure that object-oriented programming mimics:
I should clarify that I call it the “subject” because it makes sense to me. However, there's no consensus on this nomenclature. Everyone has their own opinions on what it should be called.