3 ms·
Glad I learnt the shell before some hyped "modern" scripting language. Shell scripts just keep working year after year, they do not go "out of style" and they
by 1vuio0pswjnm7 5y ago
Glad I learnt the shell before some hyped "modern" scripting language. Shell scripts just keep working year after year, they do not go "out of style" and they are generally fast. I cannot predict the future, the direction of populist computer programming is hilariously nonsensical, so much hype and failed attempts at improvement. However, like the authors of this ACM article, I know for sure the shell will outlive me. I love the UNIX shell. Not for what it is, but what it isn't.
- atoav 5y agoNothing against a good old shell script. But there is IMO a threshold of complexity beyond which shell scripts become unwieldy and where any scripting language starts to become the more rational choice. I still have python scripts from 10 years ago that happily do their job. I just had to swap print foo for print(foo) at one point when I changed from python 2 to 3 everywhere
- MathMonkeyMan 5y agoYou're lucky. The str/bytes/unicode change and the related standard library changes broke almost every python script I'd ever seen or written. It starts in libraries that you depend on -- wrappers around C code and whatnot, and then it just infects everything and breaks the world. I'm happy to be writing all my python as python 3 now. It took ten years.
- pfranz 5y agoThe rule of thumb at a previous job was if the shell script is longer than about a page then consider if another language is more appropriate. That seemed to serve me well and I had dozens and dozens of personal shell scripts to smooth over rough edges of everyday tasks. It's also obvious when you start needing features like more than simple usage or flags or parsing html. I haven't had all that much experience with Python 3, but for the 2.x series there were often tweaks that needed to be made either with code or libraries when moving between new releases with a large code base. Lastly, Python just isn't great for making one-liners. It might be a personal quirk, but that's my favorite way to iterate over an problem. With all that said, I do really like Python and use it heavily.
- lakecresva 5y agoI think this has to be tempered with an understanding that it is actually possible to improve things and create better systems. It's probably good to be skeptical of claims that whatever new thing comes along is inherently better, but it doesn't seem helpful to assert up-front that something better than the unix shell can't/won't be developed in our lifetime.