3 ms·
Hah! I have to admit that I spent quite some time thinking about whether I wanted to use this or switch to a "real" language. For all its shortcomings, I find
by iamjackg 5y ago
Hah! I have to admit that I spent quite some time thinking about whether I wanted to use this or switch to a "real" language.
For all its shortcomings, I find that shell scripting is still the easiest way to put together a tool that needs to interact with a lot of other commands, no matter how large it ends up being. I love Python to death, but using `subprocess` for everything is the opposite of my idea of a good time.
- Spivak 5y agoThe syntax for basically every "real" programming language is amazingly unurgonomic at interoperating with the outside world and moving/transforming data which is why shells are still super popular. You would think there would be more effort supporting this since it's so tedious to have a billion libraries that are just wrappers around http apis and external utility calls.
- dolni 5y ago"Real" programming languages are leagues ahead of shell scripting languages in terms of transforming and moving data around. Most shell utilities are focused on text processing or are thin wrappers around system calls. If you're using something like python's `subprocess` module to get at these, you're doing it wrong. Interactivity is where shells have an advantage. Their syntax lends itself well to that. It's also why the syntax sucks for regular programming.
- ilyash 5y agoBefore there are 10 people with "there is a library for that in Python" (because they are not and can not be ergonomic enough): Next Generation Shell is a "real" programming language. It also has syntax for calling external programs. It handles exit codes properly. It has facility for constructing command line arguments. Project - https://github.com/ngs-lang/ngs https://github.com/ngs-lang/ngs Motivation related to the above - https://ilya-sher.org/2017/10/10/why-i-have-no-favorite-programming-language/ https://ilya-sher.org/2017/10/10/why-i-have-no-favorite-prog... edit: ah, yes, NGS also supports command line arguments automatic parsing when main() is called; augmenting this facility would be the sane way to solve the problem.