3 ms·
Duplication and abstraction aren’t the same, though. Abstraction is a tool for reducing duplication. The point of the post is that if the abstraction is wrong,
by jakelazaroff 3y ago
Duplication and abstraction aren’t the same, though. Abstraction is a tool for reducing duplication. The point of the post is that if the abstraction is wrong, it’s worse than just leaving the seemingly duplicated code.
- croes 3y agoOf course because the higher costs are what make the abstraction wrong in the first place. That's like saying don't do the wrong thing.
- jakelazaroff 3y agoOh I see what you’re saying. No, “the wrong abstraction” doesn’t intrinsically mean it’s more costly than duplicated code. A lot of people argue that the wrong abstraction is still better than having duplicated code. She’s saying that’s not the case.
- williamcotton 3y agoExactly, the Church of DRY. Heathens! The truth is found in the Church of the Rule of Three. ;)
- yxhuvud 3y agoI'd disagree. An abstraction is a way to reason about a problem. Often that reduces duplication, but it is a side effect from a better understanding of the problem.