Re:My favorite principle for code quality
by madeofpalk on Tuesday May 22, 2018 @08:45PM
(#17130677)
> but more code == more errors in general.
you can't have bugs in code you never have to write!
you can't have bugs in code you never have to write!
I don't know what particular mistakes could come about in this case, but more code == more errors in general. Wrapping stuff into mini abstractions is not always an improvement.
As a rule of thumb, if some code pattern repeats 5 or more times, an abstraction wrapper is probably justified. Between 2 and 4 is a situational judgement, but lean toward skipping the wrapper. KISS.