News for hackers. Stuff that matters.
Re:Functional Programming Is Not Popular Because It Is Weird by pcwalton on Saturday February 27, 2016 @06:35PM (#11188997)
I dunno. In Rust we've found that the functional idioms are frequently faster than the imperative ones. That's because it's easier for the compiler to remove bounds checks with functional programming styles. Also, we eliminated the overheads usually assocated with FP (closure construction, indirect branches).
Re:Functional Programming Is Not Popular Because It Is Weird by dikaiosune on Saturday February 27, 2016 @06:48PM (#11189044)
I suspect that this is an area where Rust shines in a way I haven't seen described for other functional languages, so I don't know if it's as relevant to people working in those other languages, but I haven't really written anything performance sensitive and functionally-styled except in Rust.

Anecdotally, I have found a couple of times that I needed to manually implement a beautifully simple map/filter/fold call sequence in Rust because it was in a hot loop and just wasn't performing as well as a dynamic programming version that I wrote in the course of benchmarking. I've also found that plenty of times the functional style beat my hand-rolled code, which is an absolutely fantastic result, but I don't think that the compiler is yet sufficiently intelligent to replace all of my hand-rolled loops :).