The Return of Pipes (which never went away)

A while back I wrote about higher-level programming, and jQuery's map-style programming.

Mapping a function against an array isn't the only style. There's also pipes. I mean old-fashoned unix pipes. The pipe is a kind of filter, but it's also a lot like map-reduce.

In PowerShell, the computing model is based on selecting, then filtering with pipes.

In Haskell and other functional style languages, it's about generator functions or inputs and map-reduce.

Pipes exploit the fact you can launch all the programs at once, and then regulate the flow through the pipeline by blocking it - that effectively makes pipes work by demanding input, not by pushing input.

That's a lot like lazy evaluation in functional (and other) languages, where the code isn't executed until the function is evaluated, and only the arguments (inputs) required are evaluated.

Go models its Channels on unix pipes.

I was looking for some articles to link, and found this one about a pipe library for node.js.