4 ms·
DRY should really be "DRA" - don't repeat abstractions (which admittedly isn't as catchy). The problem with DRY is when abstractions with currently identical i
by senbrow 3y ago
DRY should really be "DRA" - don't repeat abstractions (which admittedly isn't as catchy).
The problem with DRY is when abstractions with currently identical implementations are given a single interface, even though they're logically distinct.
Then, when those distinct abstractions' implementations need to diverge, you've got a rats nest of references to manually pick through and separate out.
Or worse yet , the mistakenly-shared interface becomes parameterized, leading to a horrible mixing of requirements and concepts that may never be untangled if the original intent is lost to time.
Obviously DRY is great when you can consolidate multiple implementations that are actually a single abstraction, but it can really go off the rails if the motivation for the mantra isn't understood.