6 ms·
Functional programming does scale very well conceptually, and you've been using it for quite some time. It's just had a different name: Unix Pipes I believe
by francoisdevlin 16y ago
Functional programming does scale very well conceptually, and you've been using it for quite some time. It's just had a different name:
Unix Pipes
I believe using them to compose several small programs together to get a new solution has been fairly well documented :)
- barrkel 16y agoFinger slip vote on phone, sorry.
- djacobs 16y agoFixed :) But really, isn't it time for a mobile Hacker News stylesheet?
- silentbicycle 16y agoUnix 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.
- _pius 16y agoAnd they're point-free, to boot! :)