DEV Community

Discussion on: Stop trying to be so DRY, instead Write Everything Twice (WET)

Collapse
 
merklegroot profile image
Merkle Groot

The DRY principle isn't about saving time; it's about preventing your logic from diverging.
Of course it's faster to copy paste than it is to create an abstraction.

If you suddenly change your logic to prevent non-admin users from deleting items on the list page, but that logic is implemented a second time on the details page, what do you think will happen?

DRY is meant to save you from those kinds of problems.