If there's anything that a decade of functional style being "the next big thing" has taught us, functional style is not "the next big thing" and most programmers don't work well in it.
it has dramatically reduced the amount of time i spend on these and many other sorts of problems. honestly it makes programming way more fun. maybe haskell is a bit extreme for most situations but the concepts are not.
What evidence do you have that functional is taking off? Since this board was around, every couple of years there's been a flurry of 3 months when a chunk of the community bangs on about functional programming.
First it was Lisp, then Erlang, then Haskell, then F#, then Scheme. I might have got the order wrong.
And it never, ever, ever takes off because while 10% of programmers find functional truly brilliant, the other 90% can't work with it.
For context, in that time Ruby (via Rails), Python (via Django and use in Science), javascript server-side (Node.js), Go, Swift, Rust and now possibly Kotlin have all taken off. Plus various other techs like NoSQL.
In the front end space, functional programming is taking off, I think. Could be wrong, but React + Redux + immutablejs is a popular and very functional approach to UI.
Elixir appears to be on the same trajectory as Rails in it's early days. Anectodally, I know a lot of Rails devs and shops that are now primarily Elixir.
Most mainstream languages have adopted functional styles and best practices. Higher order functions, a general acknowledgement of the benefits of immutability, etc.
Fp may not be mainstream, whatever that means, but it's more popular than I can ever remember it being.
Argue its advantages all you want, but I'd say that's representative of what a failure it's been. One of the last languages supporting prototype-based inheritance has basically given up on it.
Personally, I find it an awkward way to try and encapsulate code, generally, it has terrible performance to boot.
Actually, all this time, both Python and Ruby use what we would call prototype-based inheritance.
https://www.reddit.com/r/node/comments/6oqiyn/is_es6_complet...
https://www.reddit.com/r/learnjavascript/comments/6c6use/how...
I thoroughly understand `this` now after over a decade working in javascript, as well as thoroughly understanding `this` in Typescript which I use more now.
And I still make a mistake at least once a week. I know what I've done as soon as the code fails, but it's still so ridiculously easy to get into a context you didn't think you were.
Of all the mistakes made in javascript, `this` stands head and shoulders above everything else, with its arm round the prototypal class structure.