News for hackers. Stuff that matters.
Re:Something about functions in Bash (2017) by jacobush on Friday July 06, 2018 @08:08AM (#17470719)
Python has versions
Re:Something about functions in Bash (2017) by MaxBarraclough on Friday July 06, 2018 @10:45AM (#17471784)
Python3 is pretty stable, no?
Re:Something about functions in Bash (2017) by jacobush on Friday July 06, 2018 @10:53AM (#17471876)
It's starting to get there, recently, so I am hopeful Python can be a good alternative to Bash more often nowadays!

There is also the cultural difference. In Python, it's so easy use pip and modules, but if you want something to replace Bash, you need to resist the temptation and only use what's in the standard library. The thing with Bash scripts is that they are often self contained and you can grab a huge snippet of it and it will work pretty much everywhere. (Exceptions of course, the script may do some fancy include or use a program not available, but you get my drift with this.)

Bash has been stable a long time, and the Bourne shell compatible part of it for even longer.

Re:Something about functions in Bash (2017) by vageli on Saturday July 07, 2018 @12:36PM (#17479241)
> There is also the cultural difference. In Python, it's so easy use pip and modules, but if you want something to replace Bash, you need to resist the temptation and only use what's in the standard library.

I don't think it's fair to say that bash programs are not without dependencies, just that the developers (tended to be?) are more thoughtful about portability. For example I've seen scripts that use wget or fall back to curl when it's not available. I've never seen a python script fall back to urllib3 when requests wasn't available on the system.

Re:Something about functions in Bash (2017) by jacobush on Monday July 09, 2018 @05:07AM (#17488901)
Well, culture. Python could be programmed to fallback to urllib3. Bash could have a package manager and virtual environments.

Hm... I wonder if that is a good idea or a horrible one... :)