logoalt Hacker News

northisuptoday at 5:00 PM1 replyview on HN

Duplication is fine, triplication and above is the issue.


Replies

mjevanstoday at 5:05 PM

Triplication tends to be where it becomes more clear what the correct thing to abstract or de-duplicate is.

It's of course possible to functional-ize segments of logic, but then the question of state mutation must be brought up. How isolated are these changes from other parts of the code / system state. Can this be run in parallel or is it something that must be serial? What potential race conditions exist?