As an active programmer, I am always interested in having more people in the spirit of functional programming. Therefore, I usually try to explain the advantages that FP will offer them to others, but, unfortunately, still no luck. One of the arguments that often arise in these discussions is that FP sounds very good, but it actually seems to be suitable only for limited academic purposes. This is usually supported by the argument that hardly any company uses a functional language.
I can not give any substantial arguments in favor of the lack of FP in companies other than the inherent problem of chicken eggs in this argument (I know only two companies using OCaml, and I do not think that the situation is better for other languages).
However, one of the ways of this argument often shows them where the methods from FP (although perhaps not languages) have turned it into the mainstream and may already benefit them right now. For example, since I also use a lot of C ++, I often quote the STL-Algorithm package, which is fully functional, because OOP simply does not cope with the task of simply separating data structures and algorithms from them. Another example would be git, which uses an immutable data structure, very similar to how trees are represented in any FP language (in fact, in addition to linking to previous versions, this is exactly the same), because this data structure offers the simplest and fastest perseverance.
What other examples of using FP methods in the wild can you give?
source share