It prevents bad programmers to fall into messy OOP.
Languages are less about readability and features, but always about what it allows the programmer to do, so that it prevents him for writing bad code.
I came with the idea that a programming language is a frame that surrounds the programmer, and only allows him to do things in a certain way that is tolerable and not abusive in term of design.
I'm not a fan of rust, but all the ckecks rust is doing, are very rigid, yet it is exactly what I am talking about: you help the programmer to avoid doing things he might regret and not know about.
You can write bad engineering student FORTRAN code in any language. I've seen it done in Smalltalk. In all fairness, most functional languages make this painful enough, that all but the dimmest don't bother.
I came with the idea that a programming language is a frame that surrounds the programmer, and only allows him to do things in a certain way that is tolerable and not abusive in term of design.
That's bankrupt. The best you can really do is to encourage and reward the programmer for doing it the right way. If you earnestly try to block every way of doing something bad, you just wind up with a system that's unusable.
Aka "the Wirth school of non-programming".
There's an easier way to do that: just don't program.
FP encourages taking immutability to the extreme which makes your project a comedy if finished.
Break apart an FP program and you have great general purpose libraries.
Break apart an OOP project and you have a splitting headache.
(Now that JS has classes and frameworks like angular are adopting them I think it is dangerous to flag this article and the related opinions like mine as things people shouldn't hear because they are negative.. A lot of self trained programmers are about to think they are bad programmers because there is a bad feature being adopted.)
Object Oriented Programming got to the level of "McDojo" martial arts practice. A minority of people learned the essence. The majority got to hang out with people spouting the same ideology, went through the same motions, and felt good about socializing while circle jerking together. So on the whole, it's accurate to say that OOP was oversold, in much the same way that martial arts was oversold. There was some calisthenic benefit, but not much more than that.
So what makes Functional Programming any different? I'm not so sure if anything can't turn out to be just a structured way of writing spaghetti code. Most writing is meh, and deserves to be eventually forgotten. Most music is meh, and deserves to be eventually forgotten.
Sturgeon's Law: 90% of everything is shite.