The Wrong Abstraction — Sandi Metz
If you find yourself in this situation, resist being driven by sunk costs. When dealing with the wrong abstraction, the fastest way forward is back . Do the following:
- Re-introduce duplication by inlining the abstracted code back into every caller.
- Within each caller, use the parameters being passed to determine the subset of the inlined code that th
The Wrong Abstraction — Sandi Metz
duplication is far cheaper than the wrong abstraction