What is this programming rule called?
3 answers
It is known as the Law of Demeter (aka The Principle of Least Knowledge). See http://en.wikipedia.org/wiki/Law_of_Demeter .
The clearest and most memorable illustration of this I have heard: "When you pay for a purchase in a store, the clerk does not ask you for your wallet so that they can retrieve the money, they ask you for money!"
+7
a source to share