Imagine being able to create more Bash-like .vsh scripts that do things like
xz -cd data.tar.xz | tar -xvf -
but in V:
exec('xz -cd data.tar.xz') | exec('tar -xvf -')
This may be overkill, but... kind of a fun idea!
...or maybe a simple function built into os would be plenty good enough:
pipe('xz -cd data.tar.xz', 'tar -xvf -')
I think the pipe operator could be "overloaded" at some point for channels (between go routines) - for more information (incl. go routine reentrancy) see https://github.com/vlang/v/issues/1868 . Or maybe not for channels, but rather for instruction-level parallelism using similar principles as in zero-functional.
Good point @dumblob :+1:
Closing the idea above as this is unnecessarily complexity; an os.pipe function or similar would be better.
Most helpful comment
...or maybe a simple function built into
oswould be plenty good enough: