Hacker News new | ask | show | jobs
by pyrale 3563 days ago
> 3. It should not be redundant

Not sure I agree with this one. While abstractions are a great way to reduce the length of code, sometimes they break readability. When you read code, sometimes, you feel like you don't read a solution to your problem, but a way to solve your problem masked behind abstractions far removed from the domain concepts.

That's why, sometimes, redundancy is better than the wrong abstraction.

1 comments

I've seen some very good arguments about 'redundancy' that's actually the same lines of code performing a different function in different places. In this case, naive de-duplication just adds unnecessary interdependencies between otherwise unrelated parts of the codebase.