News for hackers. Stuff that matters.
Re:Low Hanging Fruit of Programming Language Design by sethev on Wednesday November 22, 2017 @01:51PM (#15759359)
>The number of bugs are proportional to the lines of code, this is undeniable from empirical data. Ergo, fewer lines of code will tend to yield fewer bugs. So if your code is literally the same, there's no reason not to extract it into a function.

Except you've added a dependency that connects two pieces of code that were independent before.

Re:Low Hanging Fruit of Programming Language Design by rapala on Wednesday November 22, 2017 @02:31PM (#15759727)
It depends. If the duplicated code is supposed to do the same thing in both places then the two pieces of code are already dependent. You change one of the duplicates, you need to change the other one two.