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

> If DRYing the function would entail adding a conditional statement, don't. Even if remaining 90% stays the same. That 90% is a good candidate to dedupe tho.

Carmack mentions this rule in slightly different terms (https://twitter.com/ID_AA_Carmack/status/1646638023499456517):

> It is often still a good trade if an abstraction may induce some extra work where not strictly necessary, but a bad trade when you start introducing conditional behavior in your abstraction.



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

Search: