Most people say that even functional programming is less likely to land you at work, you can become a better OO imperative / programmer by learning it.
For me, this mainly involves writing "non member non friend" functions that have no side effects. But I could not come up with more examples when functional programming can be effectively applied in imperative languages, since working with the lack of language functions is often too cumbersome.
So, what are some (specific) examples / methods that you actually applied in non-functional languages ββthat were inspired by functional programming?
Another one of my own experiences
This is pretty abstract, but due to the lack of βobjectsβ in most FP languages, the culture there tends to maintain a rigorous data structure design. As a rule, in OOP languages, since the load of an additional variable in a class is too complex, it is too complex, everything happens pretty quickly. Although the same could be done using OCaml and Haskell syntax, this approach somehow feels out of place in FP.
source share