News for hackers. Stuff that matters.
Re:Functional Thinking after OO by francoisdevlin on Tuesday March 15, 2011 @11:42AM (#2327979)
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 :)

Re:Functional Thinking after OO by silentbicycle on Tuesday March 15, 2011 @03:15PM (#2328942)
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.

Re:Functional Thinking after OO by thesz on Wednesday March 16, 2011 @03:35AM (#2331197)
>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

Re:Functional Thinking after OO by silentbicycle on Wednesday March 16, 2011 @12:56PM (#2332790)
That makes sense.
Re:Functional Thinking after OO by _pius on Tuesday March 15, 2011 @06:04PM (#2329640)
And they're point-free, to boot! :)
Re:Functional Thinking after OO by barrkel on Tuesday March 15, 2011 @11:52AM (#2328024)
Finger slip vote on phone, sorry.
Re:Functional Thinking after OO by djacobs on Tuesday March 15, 2011 @11:57AM (#2328041)
Fixed :) But really, isn't it time for a mobile Hacker News stylesheet?