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

Math Online Tom Circle

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

https://blog.cleancoder.com/uncle-bob/2014/11/24/FPvsOO.html

View original post

Author: tomcircle

Math amateur

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: