Counter Example Of Acyclic Dependencies Principle

last modified: September 30, 2004

AcyclicDependenciesPrinciple is usually applied to packages.

When applied to objects, it doesn't seem to hold. Some ObjectOriented practitioners think that classes are a kind of packages, so the AcyclicDependenciesPrinciple should still hold. However, in SmalltalkLanguage we have the following CounterExample:

  1. See the Object class.
  2. See the Boolean class.

Boolean is subclass of Object, but Object uses Boolean.

In Java the same occurs among Object and String.


Loading...