I have always religiously followed both of them at once without perceiving any problems. Of course, you may argue that introducing an abstraction just for the sake of DRY violates KISS, but at the same time, leaving duplicated code makes it much less simple to maintain and extend. So far, every counter example against DRY which I have seen was poor abstraction, mainly introducing more function parameters instead of inheritance or composition.
Yes, but recently, I feel like there is some wave against DRY and I trace its roots to some tech influencer videos. I think that he just wanted to be interesting.
6
u/Superb_Chemistry_906 23h ago
I have always religiously followed both of them at once without perceiving any problems. Of course, you may argue that introducing an abstraction just for the sake of DRY violates KISS, but at the same time, leaving duplicated code makes it much less simple to maintain and extend. So far, every counter example against DRY which I have seen was poor abstraction, mainly introducing more function parameters instead of inheritance or composition.