4 ms·
As someone who has gold in Bash on Stack Overflow, I can say this with confidence: Bash is just a shitty programming language. If you are writing anything larg
by svnpenn 6y ago
As someone who has gold in Bash on Stack Overflow, I can say this with confidence: Bash is just a shitty programming language.
If you are writing anything larger than about 60 lines, don't use Bash. Almost anything else will be better. Python, PHP, Ruby, JavaScript, even Go.
- snidane 6y agoTrue. However 60 lines of bash would amount to 300 lines of Python.
- diarrhea 6y agoPossibly, not necessarily, and I'd argue it's for the better. If a bash one-liner requires a wizard to decipher (especially because people way overuse short options over long ones in scripts), and 10 lines of equivalent Python can be understood by someone who has never actually written any Python, I know what I'd pick. This also helps in eradicating bugs. Bash is very hard to get right (hence this thread in the first place), even for the simplest stuff. This simply won't happen in Python (or any other proper language).