3 ms·
>they're generally a premature optimization This example actually seems to be the opposite of an optimization. There's 50% more code to maintain and there appe
by crdoconnor 9y ago
>they're generally a premature optimization
This example actually seems to be the opposite of an optimization. There's 50% more code to maintain and there appears to be almost no appreciable benefit to compensate for that.
- dx034 9y agoLOC is a bad measure for the complexity of code. Quite the opposite, expressive code can be faster to understand and easier to maintain than the same functions with half the code size. In any case, switching to a compiled language and static types should bring some benefit, in addition to the gain in speed.
- crdoconnor 9y agoIME 95% of the time SLOC approximates code complexity just fine. Just because you can write horrendous 'clever' one liners in perl does not mean that most code out in the wild is like that. I certainly don't think the same author writing the same app in two different languages will be writing like that. Zero mention was made of bugs caught or customer-noticeable speed improvements so I'm inclined to think that there was actually no benefit to having static typing.
- benhoyt 9y agoNo, there was no appreciable user benefit, and that was intended. To respond to others: it wasn't a "premature" optimization, because it wasn't any kind of optimization. The sole benefit in this case was for me to learn Go programming -- and I noted that in the article title and intro. :-)
- monktastic1 9y ago> There's 50% more code to maintain Given that Go is similarly verbose to Python, probably 100% more code.