Knowledge
Search knowledge... ⌘K
Knowledge · Anti-Patterns
Smell Inappropriate Intimacy
Anti-pattern indicating need for refactoring
Tags
refactoring-fowlercode-smellmaintainability
Impact
Classes that spend too much time delving in each other's private parts. Classes should follow strict encapsulation - keep their distance from each other's internals.
Symptoms
- Classes access each other's private fields extensively
- Bidirectional associations that could be unidirectional
- Subclasses know too much about their parents
Source
Martin Fowler — Refactoring: Improving the Design of Existing Code, 1st Edition (1999)