Piep: bringing the power of python to stream editing
gfxmonk.net
gfxmonk.net
The total sum of complexity to learn/use would be about the same (and Python would get multi instruction anon funs.)
python -c 'import sys; a = int(sys.stdin.readline())) ; print(range(a))'
EDIT: Not that I'm saying piep is useless; far from it, it seems very interesting. I'm saying that optional {}s wouldn't solve the problem that piep is trying to solve.Another example: map {} is better than having to learn weird single instruction variants like list comprehensions. And so on.
In this case, it is easy to have a shell alias that loads a module and executes its parameter in any other language. Then you have any piep functionality not already built in. Ergo, no need for extra things to learn, in those languages.
Plus, it still doesn't solve the piping issue. constructing a command as a sequence of operations like:
p.foo() | len(p) | p + 1 | str(p)
is much easier to follow (and modify) than
str(len(p.foo()) + 1)
this is not a big deal for programming languages because we use variables, functions and other ways of structuring our code, but those don't map well to oneliners.