Is there an alternative to the term "calling object"?

Posted by ybakos on Programmers See other posts from Programmers or by ybakos
Published on 2011-11-15T19:06:41Z Indexed on 2011/11/16 2:07 UTC
Read the original article Hit count: 199

Filed under:

Let's suppose you've got a class defined (in pseudocode):

class Puppy {
    // ...
    string sound = "Rawr!";

    void bark() {
        print(sound);
    }
}

And say, given a Puppy instance, you call it's bark() method:

Puppy p;
p.bark();

Notice how bark() uses the member variable sound. In many contexts, I've seen folks describe sound as the member variable of the "calling object."

My question is, what's a better term to use than "calling object?" To me, the object is not doing any calling. We know that member functions are in a way just functions with an implicit this or self parameter.

I've come up with "receiving object," or "message recipient," which makes sense if you're down with the "messaging" paradigm.

Do any of you happy hackers have a term that you like to use? I feel it should mean "the object upon which a method is called" and TOUWAMIC just doesn't cut it.

© Programmers or respective owner

Related posts about object-oriented