logoalt Hacker News

jstimpfletoday at 4:55 PM1 replyview on HN

Code duplication is the wrong abstraction too -- unless it's not really code duplication but code that only happens to be similar for some really "unstable" reason.


Replies

dofmtoday at 5:02 PM

I would agree that there are good "de minimis" reasons not to abstract code that isn't ready to be abstracted at all. If the pattern has not settled it shouldn't be forced into an abstraction (beyond those that make sure it is e.g. not vulnerable)

But beyond that, any stable abstraction is better than duplicated code.