| > But the expense of extra lines of co[d]e come at significant maintenance costs. All lines are not created equal. if err != nil {
return err
}
Those 3 lines have very, very little maintenance cost.The obvious must also be mentioned: less lines of code usually mean building on abstractions - the lines of code are in there, somewhere, but not in your code. Better hope that abstraction is well-tested. Of course it's all a matter of balance, but I disagree with "more lines of code is inherently a bad thing", which stated another way, would mean "cram as much information as possible in a single line of code". In the end, lines of code are a bad metric of software. |