3 ms·
> composition via pipes That’s a good, big one in favour of shells. Re: file system, std err/out, I’m not convinced, but pipes alone are worth a lot. I wasn’t
by bch 9y ago
> composition via pipes
That’s a good, big one in favour of shells.
Re: file system, std err/out, I’m not convinced, but pipes alone are worth a lot. I wasn’t thinking at all of pipes, and you’ve tipped the scales, but is it enough? Do Tcl/Perl/ruby/python/... compete in that space?
- jancsika 9y ago> Re: file system, std err/out, I’m not convinced, but pipes alone are worth a lot. How does the existence or lack of a standard data interchange format affect the value of those pipes?
- bch 9y agoIt seems to me that theoretically the effect is brutal. Practically, it’s negligible. We pipe everyday, all day, and the world carries on, so that’s a pragmatic vote of confidence for pipes. Are you trying to get me to write a “worse is better” essay that ends with “...and the existence and continued durability of shell scripts is proof enough that their place is not only justified, it’s vital!”, because it won’t work. Pipes are good. Shell scripts should be looked at suspiciously if they’re more than 20 lines long. ;)
- philipov 9y agoPipes aren't even something shell scripts have a monopoly on. They're just as easy to use in Perl. Perl may not be known for its readability, but it still ends up miles ahead of an equivalent script in bash. I do wish there was a first class syntax for it in Python (but you can get most of the way there by using generator/coroutine pipelines).
- chubot 9y agoFWIW this post is related: Pipelines Support Vectorized, Point-Free, and Imperative Style http://www.oilshell.org/blog/2017/01/15.html http://www.oilshell.org/blog/2017/01/15.html I started writing a series on "what shell can do that other languages can't", but I put it on hold until the shell is in better shape. I hope to resume that series in the next few months.