Fusion of object oriented and functional programming
January 02, 2019
The fusion of Object Oriented Programming (OOP) and Functional Programming (FP) languages has become increasingly popular in recent years, with many programming languages now offering features and constructs from both paradigms.
OOP is focused on representing complex systems as collections of interacting objects, each with its own state and behavior. Key features of OOP include inheritance, polymorphism, encapsulation, and abstraction. Some popular OOP languages include Java, Python, and C++.
FP, on the other hand, is focused on creating programs by composing functions that transform data. Key features of FP include immutability, higher-order functions, currying, and recursion. Some popular FP languages include Haskell, Clojure, and Scala.
By combining elements of both OOP and FP, developers can take advantage of the strengths of each paradigm. For example, OOP can be useful for representing complex systems with many interacting components, while FP can be useful for writing concise, declarative code that is easy to reason about.
Examples are Kotlin, Rust and Scala.
In 1998 I wrote my diploma thesis “geometric algorithms in Haskell”.