DEV Community

loading...

Discussion on: When DRY Doesn't Work, Go WET

Collapse
lifelongthinker profile image
Sebastian

DRY is just a principle that competes with other principles. Repetition can happen on any level of abstraction, so you need to find a remedy applicable to the right level.

The problem here is not the abstraction itself. Any abstraction only holds for so long and then gets in the way of the implementation. The problem here is that adding new logic usually involves refactoring. With the right refactorings in place, new abstractions can replace old ones.

Besides WET, you could also use different approaches, make different trade offs, such as Composition over Inheritance.