News for hackers. Stuff that matters.
Re:Ask HN: Why is functional programming not more popular? by fulafel on Wednesday November 06, 2019 @01:35AM (#21460224)
I think your 3/4 are true for some people, maybe for those who were taught academically flavoured FP in a computer science program, but on the other hand when I web search for "why functional programming", the articles bring up immutability and side effects first and rarely mention recursion or higher order functions.

Also, can't resist nitpicking about tail call optimization: clang/llvm and gcc implement it in a non-gc language (C), but meanwhile some FP language implementations lack it, at least Clojure does. So while there's more demand for that feature in the FP world and some FP languages like Scheme require implementations to perform this optimization, it's conceptually somewhat orthogonal to FP or GC.

Re:Ask HN: Why is functional programming not more popular? by valand on Wednesday November 06, 2019 @01:53PM (#21465707)
I didn't mean to say immutabilty and no-side-effects are advertised less. It's just not enough of them are effective.

Those concepts helped me avoid a lot of headaches without knowing that those are concepts of FP. Then there was a day where I just realized, "Oh, this is FP"

I guess people need to be educated, or experience themselves, the concepts, before hearing the word "FP" which mean less to them.

The examples provided in the internet needs to be more ambituous than mere chains of functions. They need to be "remaking rsync with minimum IFs" or "large scale React App without a single getDerivedState"