Two functions look similar but encode rules owned by different domains that are expected to change independently. What should guide a decision to merge them?
Answer & explanation
Shared meaning and a shared change lifecycle.
Similar text can arise from different requirements. A shared abstraction is useful when the meaning and lifecycle are shared. Understanding that distinction prevents DRY from becoming a rule to merge everything.
The Pragmatic Programmer
Chapter 2 · A Pragmatic Approach
AI reviewed · sources pending · version 9
Generally accurate according to an AI review. Sources and this book association have not been verified.
