Why do Object-oriented languages adopt functional programming?
The latest versions of Java already include lambda expressions, C # a long time ago, each version of C # includes more functional features and in its version 7, it includes the functional concept of pattern matching. Ruby, Python or Go ...
------ 🇪🇸 -----
¿Porqué lenguajes orientados a Objetos adoptan la programación funcional?
Las últimas versiones de Java ya incluyen expresiones lambda, C# hace mucho tiempo, cada versión de C# incluye más características funcionales y en su versión 7, incluye el concepto funcional del pattern matching. Ruby, Python o Go…
Nobody has commented that it is strange or an error, I think it is a success, since it is strengthened with the virtues or advantages of both paradigms, while at the same time compensating the disadvantages of each one of them.
Functional languages tend to be more naturally parallelizable. They encourage the use of immutable data structures which reduce the side-effects that make code hard to run on multiple processors. ... Many of the major OOP languages are also adopting functional features.
adding to many practical reasons cited in previous comments,
The same way simple variables are not replaced by objects attributes, functions are not replaced by methods..
methods are attached to a class or an object.. Something not practical when your aim is to avoid repetition of some piece of code, or recurcitivity..