2 ms·
That's not entirely true. The difference between intentional and accidental repetition is that the first occurs because the rule is the same in both repetitions
by charles_f 2y ago
That's not entirely true. The difference between intentional and accidental repetition is that the first occurs because the rule is the same in both repetitions, and should be the same ; whereas the second happens to be the same for now. In not repeating yourself in the second case you actually risk changing an operation that should remain the same, as a side effect of changing the common function to alter the behaviour of the first.
That's why DRY is a smell (indicates that something might be wrong) and not a rule.