This is a guideline which restricts the interactions between objects. If you adhere to this guideline, you naturally reduce the coupling between modules.

When writing a method, the body of that method may only invoke specific other methods. The law wants that method to only talk to ‘close friends’.

Formally, any method of an object may only invoke methods of the following objects:

  • itself
  • arguments to
  • attributes of
  • objects created by
  • global variables has access to