4 ms·
> 500 lines But line counts are nearly meaningless. Something like a quarter or a third of those lines are going to be a single closing brace character. So mos
by throwaway894345 6y ago
> 500 lines
But line counts are nearly meaningless. Something like a quarter or a third of those lines are going to be a single closing brace character. So mostly we’re saying that Go’s style involves a lot of beeline characters, but that doesn’t tell us much about even boilerplate much less complexity. And to be quite clear, Go does have more boilerplate than many other mainstream languages, but line counts are a particularly bad way of measuring it.
- lmm 6y agoCitation needed. As far as I know, line count is the only thing that's ever been shown to be correlated with bug count. (And that aligns with my experience, because a line with just a brace increases the number of screens you need to page through to understand a given piece of code just as much as a line with many more characters on).
- throwaway894345 6y agoCorrelation isn’t on trial, causation is. That said, I think there may be some merit to the hypothesis that more code on the screen at one time makes it easier to understand a program; however, I could also see that working in the inverse, i.e., more noise (as opposed to whitespace) to scan through between the bits you care about.