开发者

Terminology - users of a class

I'm writing some documentation and I just can't find the right word. Let say my class is called Writer and some people will be using it. How should I name objects that use the class (or instances of) I'm documenting?

  • Users of Writer class? - Program is not "a user".
  • Consumers of Writer class? - Sounds like somebody will eat it.
  • Callers or Writer class? - Sounds good for methods only.

There mus开发者_开发问答t be a correct word for this and I should feel stupid for asking but please, help.

Edit: just to clarify, I'm thinking about the code (not programmer) that is calling and using the class or instance of it (well, maybe I'm thing in code to much...)


I will prefer user anyway, even it is not a end-user. When you write documentation for your code the target audience is a programmer that will use your code. That programmer and their programs are users of your code.


How about "Client"?


First of all, know that there are no stupid questions, just stupid answers.

An End-User (the developer in this case) would be the user of the class.
Consuming is a verb related to aquiring resources.
Indeed calling is for functions.


Well, in the classic book Thinking in Java 2nd edition, there are two ways of using a class: by composition or by inheritance.(yes, this bit is also important)

I don't remember the exact words, but the summary would be sort of like this:

composition - you create a new object from which the target class instance would be referred.

inheritance - you create a new class that inherits (extends) the target class, provided that class is able to be inherited from.

For the exact terminology, I would say it really doesn't matter that much.

But if you want just describe the case where a new instance of such a class is created, you could say some actor (user) instantiates a new object of this class.

Hope this helps.

Edited : the terminology really depends if you think it is the user or the user's code that makes use of the target class.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜