On 2009-12-22 14:24:41 +0100, Andrei Alexandrescu <[email protected]> said:
Daniel de Kok wrote:
...in pure FP. Of course, another problem is that some algorithms are inherently imperative. For instance, I find calculating the edit distance in a performant manner ugly in functional languages.

So then I guess I can be given a break about FP ueber alles.

Hey, it's not me arguing for that. I think every paradigm has its place...

And I am not in for parotting the 'we absolutely need pure FP for a multicore world' stanza. While full purity certainly helps for lock-free programming, it reduces the world to one where there are no embarassingly parallel programs. In natural language parsing we get (nearly) linear speedup without purity, with single-thread processes (just split a corpus in N parts, and run a parser for each part). Or if you do vector/matrix calculations on a GPU it's also a mutable world (with the exception of texture memory).

Of course, there are good counter-examples where purity helps. But it's not a black-white world. Not that I really have to say that on a D list ;-).

-- Daniel

Reply via email to