by lhnz · 10y ago · 0 comments
For example, I've always felt that the fact that almost everything in shell programming is a gigantic string is really bad. It would be much nicer if all commands had type signatures, and therefore piping commands into each other could throw type errors if it does not make sense.
This would also allow much better feedback when stringing together commands, since the shell IDE would be able to recommend commands that act upon a particular type. For example, if a command produces output that could be considered to be N > 1 lines long then `wc -l` would be available, however if this isn't the case it does not make much sense for it to be recommend to the user.
So I know that:
> Write programs to handle text streams, because that is a universal interface
But I also think that:
> To build it out of simple parts connected by well-defined interfaces.
Many text representations are vastly different, and neither simple or well-defined.