Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.


I'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.


Of 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.


Oh 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.


Exactly, the Church of DRY. Heathens! The truth is found in the Church of the Rule of Three. ;)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: