DEV Community

Discussion on: The two universes of programming! OOP and FP!

610yesnolovely profile image
Harvey Thompson • Edited on

Great summary of the two different paradigms.

Personally I'd recommend starting with OOP (or even imperative/declarative), because we often think about "Nouns" (class) and "Verbs" (method), and our minds are good at breaking down problems into categories and hierarchies.

However, one should also learn functional program - even in a non-functional language. The reason is that computer power is still increasing exponentially, but now that power comes from having multiple CPUs and threads.

Working with immutable data (see also persistent data structures) in functional languages with multiple threads/CPU is much easier to reason about, compared to working with mutable data, threads/locks (though knowing about such things is very important).

Modern programming languages are typically multi-paradigm, and we're seeing more and more functional ideas being applied in historically OOP languages.

So, learn both :-D

adnanbabakan profile image
Adnan Babakan (he/him) Author

Thanks for your comment
Yes OOP is good to start with but learning FP opens a new universe in a programmer's mind due to immutables and so.

And yes I love how OOP langauges are adopting FP features.