|
The OPs claim that it has been shown that bugs are a function of LoCs is unsubstantiated at best. The number of bugs in a program correlates with the number of LoCs, but that's about it (correlation does not imply causation). The claim is also quite absurd, since, for example, you can pre-process any C or C++ program ever written into a single line of code, yet this operation doesn't reduce the number of bugs in these programs, therefore the amount of bugs is not "just" a function of the amount of LoC. Languages with better abstraction capabilities than Go (e.g. Rust or Python), might require programmers to type less, but the resulting lines of code are often dense. For example, I'm quite comfortable with Rust iterators and Python lists comprehensions, but it still takes me much longer to parse what code using these abstraction does, than code that just uses a simple for loop. It definitely feels great to cram a 10 LoC loop into a 1 LoC list comprehension in python, but reading that code 6 months later never felt that great, even for code that I've written myself. I just need to stop at those lines for much longer. |
And this excessive flexibility doesn't even make simple things simple. Try counting down from N to 0 inclusive using unsigned ints.