The Software War : Object-Oriented Programming (OOP) vs Functional Programming (FP)

The “war” of OOP vs FP is akin to Applied Math vs Pure Math.

The formers (OOP & Applied Math) are not “rigourous” but practical, compared to the laters (FP & Pure Math) which are elegant but too abstract for popular usage.

OOP: SmallTalk and its followers – C++, C#, Objective-C, Java…

FP: LISP and its followers – Haskell, Clojure, …

The “hybrid” (OOP&FP): Scala, Kotlin (Google: Java ‘cousin’), Swift (Apple: Objective -C ‘cousin’), F# (MicroSoft)

The “cons” of OOP, which are bad for concurrency / parallel computing in multi-cored CPU:

  1. State changed
  2. Side-effect
  3. Mutability of data
  4. Polymorphism