5 ms·
Python and Lisp use way more parens (which many find unergonomic) and don't have pipes. Let me qualify that - parens are cumbersome with the usual tools and eve
by jdc 7y ago
Python and Lisp use way more parens (which many find unergonomic) and don't have pipes. Let me qualify that - parens are cumbersome with the usual tools and even if you add pipes to your Python/Lisp project the ecosystem doesn't follow the idiom. That being said, there is a Python shell called xonsh, but that uses kind of a Python - bash hybrid AFAIK.
- shakna 7y ago> and even if you add pipes to your Python/Lisp project the ecosystem doesn't follow the idiom. That isn't quite true. While, yes, a pipe operator would probably be something new that you add to the language, Scheme which Racket originally comes from, actually comes with first-class pipe support. Scheme makes use of a concept called ports, quite extensively. You can turn files, sockets, string, etc. into ports. Ports are most definitely idiomatic Scheme. Racket extends ports with this: (make-pipe [limit input-name output-name]) Which works to transfer data from one port to another in basically the same way the pipe operator works at the shell level. To make it work the way people are more used to, you might also combine it with the infix library. So if you wanted to create a pipe operator for some reason, everything you need is already there, it'd just by syntax sugar.
- jdc 7y agoHeh neat. I guess this is what scsh does.