I am always wary of anything that is promoted as a programming panacea. It’s a fact that functional programming and object-oriented programming are flip sides of the same coin. It’s hard to believe that one or the other is substantially safer and more reliable. To me, that’s counter-intuitive.

I believe you when you say FP can eliminate certain classes of bugs. I’m not sure that’s a big enough deal to say it completely wins over OOP. OOP has other advantages that FP doesn’t have.

There is also much variation in functional programming languages, and indeed the very definition of functional programming is mercurial. Immutability is not always required (although it’s sometimes optional). Most FP languages aren’t even statically typed.

Macro capability, which is not present in most FP languages, is a particularly sophisticated way to allow for extensibility in a programming language, but it’s not a panacea either. There are other ways to enable extensibility, and in fact Smalltalk’s approach is quite elegant.

At any rate, this debate is moot. Functional programming will never dominate in the IT industry. It will never relegate object-oriented programming to secondary status. The industry has far too much invested to NOT use OOP.

The educational system is heavily oriented to OOP (Java and Python are the two most commonly taught languages to university freshmen), probably because it would be much harder to teach FP.

The vast majority of developers are OOP-trained, and until they die off or retire, OOP’s momentum will continue unabated. Functional programming will always be something that you add to existing software development (OOP) methodology, not employ in lieu of.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store