4 ms·
The reason why we use Bash on Linux is because it’s ubiquitous. Even though my terminal is ZSH, all my scripts will be Bash because I can trust it to run on any
by ClikeX 3y ago
The reason why we use Bash on Linux is because it’s ubiquitous. Even though my terminal is ZSH, all my scripts will be Bash because I can trust it to run on any system.
Same goes for Windows, I want to make sure those scripts can be run without having to install anything. Powershell is there, and it’s powerful.
I’ve got a job to do, and a problem to solve.
- bogwog 3y agoPython is better for anything complicated. Even though Bash is ubiquitous, it's kind of a pain in the ass, and it's actually not that portable since there is no real "standard library", and everything basically depends on system tools being installed and/or configured in a particular way.
- pas 3y agopython is also extremely fragile compared to something compiled just setting up the python env to run the "script" requires a ton of bash (or simpler python) of course it's true in all cases that if you know what's your supported/required/target environment is, then just a few lines of bash/python is enough. but the wider the spectrum of complexity one must handle the more it pays off to front load said managing, and distribute a compact and powerful program with few dependencies and as minimal complicated bootstrap steps as possible.
- oblio 3y agoAmusingly for projects of medium complexity, Powershell is probably comparable or better than Python, on Windows, especially for sysadmin type stuff. Powershell actually had optional typing from day 1 but unlike mypy & co, it's actually checked. As in, types were optional, you didn't have to write the down in the code, but if you did add them, using the wrong types would error out. Powershell also has great integration with .NET so almost every .NET library is available if you need it and the deployment story is ok - Powershell needs to be installed and you can bundle everything else you need.