Hacker News new | past | comments | ask | show | jobs | submit login

I don't understand your hostility to pipes. It seems to be based on the fact that they were invented some time ago? On the contrary, the soundness of an idea famous enough to be known today is probably positively correlated with how old it is.

Pipes are a combination of dataflow programming and monadic computation, and are naturally parallelizable, functional and generally pipe processes don't share mutable state. All these concepts are highly relevant to modern programming.




I think my hostility was more towards the posted article than pipes.


pvg's dislike seems to be that pipes transfer a stream of octets with no inherent syntax or semantics. That means every program needs baroque options to impose structure, which is difficult to create, maintain, and debug. Also brittle.


And on the other hand, text streams are easy to work with, because ad-hoc tools can be written to work with them, rather than having to wrestle with strongly typed libraries and being constrained to languages compatible with the libraries that define those types. Imagine a web written using CORBA RPCs over rendering APIs, rather than HTML over HTTP.

You can argue that HTML has inherent syntax and semantics, but of course server and client can have slightly different ideas, and it all still works, mostly. The same is largely true of shell programming using pipes: different stages in the pipe expect certain formats, for regular expression or field extraction, and format pasting together, etc. The format is easy to eyeball and easy to test on the shell REPL, so in practice the problems aren't large.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: