In a software application, I have an access model that contains a set of data structures, each describing how a given entity may or may not act upon another given entity. An "entity" is a person, a thing, or a group of people and/or things.

  • Alice may read mail sent to Bob.

  • Carol may not send messages to residents of Danville.

  • Everyone may connect to the public server.

    (These are contrived examples only. I am not writing a mail server.)

In each sentence above, we have:

  • an actor (Alice, Carol, everyone),
  • a permission (may, may not),
  • an action (read mail, send messages, connect), and
  • an object, either direct or indirect (Bob, residents of Danville, the public server).

A hallmark of quality, maintainable software code is clarity—that is, it should not only be easy to understand, but the intentions should be clear. An important facet of this goal is that the names of things should make their functions obvious. They should also be concise, because long, overly descriptive names are not only more effort to type, but also more effort to read.

What's more, the parlance must cater to the particular language quirks that are the jargon of the industry. For example, the word "object" would be a poor choice here, because that word has an industry-specific meaning that would render it rather ambiguous in this context.

I'm therefore struggling with succinct names for the person or other entity who performs an action and for the person or other entity who/which is the recipient of said action.

The original terms I came up with were principal, as in "a chief actor or performer", and target, as in "one to be influenced or changed by an action or event." It occurs to me, however, that the linguistic terms that most closely represent the concepts are agent and patient.

Going back to the subject of clarity, though, I'm not sure that these uses for "agent" and "patient" would be immediately understood by software developers, or indeed by most people without a background in linguistics. I wonder, then, if the original words are clearer, and if perhaps there exists another pair of terms that would be an even better choices.

  • so you want names for the one who performs the action and on whom it impacts – vickyace Apr 27 '14 at 16:20
  • 3
    I don't like patient, and I don't like principal. What's wrong with an agent acting on a target? – Peter Shor Apr 27 '14 at 16:23
  • 1
    If your developers do not understand what an agent is, it think it is a good thing they learn it :) It is very commonly used in IT. On the other hand, patient will be understood as someone who is ill and needs a doctor, not an agent. – oerkelens Apr 27 '14 at 16:52
  • What about "acting entity" and "entity acted upon"? – rogermue Apr 27 '14 at 17:56
  • 2
    This question appears to be off-topic because it is about naming, including naming programming variables/classes. – MrHen May 6 '14 at 14:47