Introduction to OOP: Chapter 17 : Visibility and Dependency
Rewritten in terms of messages
Law of Demeter (weak form). Inside a method, it is only permitted
to access or send messages to the following objects:
- The arguments associated with the method being executed (including the self
- Instance variables for the receiver of the method.
- Global variables.
- Temporary variables created inside the method.
The strong form eliminates global variables and inherited data fields.