Re:Code duplication is far cheaper than the wrong abstraction
by northisup on Sunday June 21, 2026 @01:00PM
(#48620503)
Duplication is fine, triplication and above is the issue.
[ Parent
| on HN ]
Re:Code duplication is far cheaper than the wrong abstraction
by mjevans on Sunday June 21, 2026 @01:05PM
(#48620541)
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?