Hacker News new | past | comments | ask | show | jobs | submit login

> I would probably choose Go for core infra for being able to move quickly as a developer

At the company I used to work at it took nearly a 1000 lines to replace an 80 line bash script. So I can't help but laugh at this statement.




I've helped port some bash-based CLI tools to Go. The amount of code produced was pretty similar, just some overhead for typing and adapting some of the `awk` and `sed` functionality to be self-contained in the program. What kind of stuff was this 80 line bash script doing that resulted in over 12.5 times more code?


Since when LoC is a meaningful metric?


Since always but it depends on what you actually take into account.

More LOC means more opportunities for error, and more resources needed to review that code and more time required for a new developer to get familiar with the code base.

That said if you have 85 LOC vs 1000 it usually means that the 85 LOC “app” used a metric ton of external dependencies which are on their own a good source for problems.

When comparing apples to apples (as in both apps use dependencies equally) I don’t see how such delta can be caused by using a different language, even using assembly would likely not cause this much inflation.


I LOLed on this one :) I can literally double LOC in any project, just by putting { } on separate lines


If you LOLed at this one you likly don’t understsnd how LOC are counted.


How well did the bash script handle exceptions?


I can replace those 1000 lines with a bash script of 1 line that just calls the Go program ^_^




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: