The word "Dependency" is used a lot in programming. But I think we might be using it wrong in many ways. I will use "Dependency Injection" in this post as an example. According to the Dictionary.com, the "Dependency" means:
- the state of being dependent; dependence.
- something dependent or subordinate; appurtenance.
- an outbuilding or annex.
- a subject territory that is not an integral part of the ruling country.
Let's take the second meaning. Dependency denotes a thing that depends on another thing(s). However, when we say "Dependency Injection", what the dependencies are not the objects requesting other objects to be injected to themselves, but the objects that are being injected. But according to the meaning given in the dictionary, this understanding is wrong. Actually, we are not injecting dependencies, but dependencies request other objects to be injected since they depend on those objects that they specify in their constructors. Perhaps a name like "Requestor Dependency" pattern would be accurate.
A justification would be that we call the injected objects "Dependencies" because they are part of a dependency graph in which they depend on the other objects, but from the more realistic stand point, this justification of the way how the word "dependency" is used in DI pattern seems not sufficient to me.
I am not a native English speaker. Therefore, I may be wrong on this subject. But whenever I think about dependency, the meaning of it in the dictionary and how it is used in the programming conflict with each other.