4 ms·
Unix pipes aren't functional programming (which emphasizes immutability and referential transparency) - they're more like the actor model, which creates a syste
by silentbicycle 16y ago
Unix pipes aren't functional programming (which emphasizes immutability and referential transparency) - they're more like the actor model, which creates a system out of lots of small programs communicating via message passing. And yes, they do scale very well, conceptually.
Erlang does both, maybe that's where the confusion is coming from. They're very complementary, though: having separate, concurrent processes seems to be an excellent pressure release for difficulties that can build up doing pure functional programming.
Also, Erlang has an novel (and extremely effective!) error-handling system for the actors, while error handling for Unix pipelines (or asynch/event-loop systems!) can be tricky.
- thesz 16y ago>Unix pipes aren't functional programming (which emphasizes immutability and referential transparency) - they're more like the actor model, which creates a system out of lots of small programs communicating via message passing. Unix pipes are lazy lists. Operations on lazy lists allow you to use Mealy machine [1] created from pure functions. Mealy machine uses pure functions that transforms input and previous state to output and next state, which state then goes back on the next cycle. And then you suddently have Turing completeness (because of arbitrary state). My argument is supported by the fact that Unix pipes could not change the topology of computation structure, so do lazy lists, while actors could. [1]: http://en.wikipedia.org/wiki/Mealy_machine http://en.wikipedia.org/wiki/Mealy_machine
- silentbicycle 16y agoThat makes sense.