The
Law of Demeter for
functions states:
A method "M" of an object "O" should invoke only the methods of the following kinds of objects:
- itself
- its parameters
- any objects it creates/instantiates
- its direct component objects
Demeter is a research project at Northeastern University, lead by Dr. Karl Lieberherr. The term "Law of Demeter" refers to the paper "Assuring good style for object-oriented programs " by Lieberherr, Karl. J. and Holland, I., Which appeared in IEEE Software, in 1989.