[TUHS] Proliferation of options is great simplification of pipes, really?

Rich Morin rdm at cfcl.com
Mon Feb 22 17:20:26 AEST 2021


I've been happily using pipes since I found out about pipes, back in the early 80's (Thanks, Doug!).  However, until recently I didn't write applications in a programming language which supported them "internally".  Recently, however, I've been using Elixir, which does:

Pipe Operator
https://elixirschool.com/en/lessons/basics/pipe-operator/

Note that, although the basic pipe implementation simply does composition of functions with error handling, the Stream variant offers lazy evaluation:

Enumerables and Streams
https://elixir-lang.org/getting-started/enumerables-and-streams.html

Yes, I know that F# (and probably other languages) had pipes first, but I still give points to José Valim for stealing wisely and well.  Various folks then built onto the basic pipe mechanism, e.g.:

- https://github.com/batate/elixir-pipes - extension library for using pattern matching with pipes, etc.

- https://hexdocs.pm/broadway/Broadway.html - concurrent, multi-stage tool for building data ingestion and data processing pipelines with back pressure, etc.

fun stuff...

-r

 


More information about the TUHS mailing list