Don't DRY Your Code Prematurely
Dark Arc @ Dark_Arc @social.packetloss.gg Posts 78Comments 2,258Joined 2 yr. ago

Dark Arc @ Dark_Arc @social.packetloss.gg
Posts
78
Comments
2,258
Joined
2 yr. ago
Deleted
Permanently Deleted
I think it's a good example of the problem though. People take that same idea and apply it too liberally. The point isn't that specific code, it's about not apply DRY to code that's coincidentally identical.
That's... Not at all true in practice. What often happens with these "DRY" abstractions when they've been improperly applied is you end up with an inheritance hierarchy or a crazy template or some other thing. You're really lucky if you can just copy some code and find your way out of the weeds.
There are plenty of bad abstractions in the wild and novices applying DRY is a common source of them.