Dwayne Charrington
Jul 31 · 2 min read

Any incompetent developer can write poor, hard to debug code. People like yourself and many others are quick to scapegoat, “Oh, it’s OOP’s fault that code is bad, it’s costing us trillions” completely ignorant of the fact that you can write bad code adhering to Functional Programming principles. FP is not a magic bullet that automatically produces clean, easy to test and bug-free code.

The one thing that I find funny whenever I see object-oriented programming mentioned, nobody seems to be able to explain what OOP actually is. I have seen countless explanations for what people think OOP is and they’re all different. What is object-oriented programming, really? If you think it’s about inheritance, you’re wrong.

Let’s be honest, it’s a huge exaggeration to say that OOP is costing companies trillions because of the headaches it can create. Many of the criticisms of OOP that I have seen all seem to go back to one of the features of it: inheritance, specifically multiple inheritance. Anyone who has been programming longer than a minute knows multiple inheritance is a huge no-no.

Don’t get confused here, I agree that in many cases object-oriented code introduces more trouble than it’s worth. But, we have to ask ourselves in 2019 if FP purists are still trying their hardest to spread the anti-OOP message like militant vegans telling people not to eat meat, what do you hope to achieve? The louder you shout, the more likely people will stop listening.

I have definitely seen some bad object-oriented code in my time, I have also seen some bad functional code by developers who thought they were being clever and ended up creating a complicated codebase that people had to bang their heads against the desk to work out.

If we improve the messaging around inheritance and educate programmers, you soon realise this one aspect makes up probably over 90% of every functional programmer’s argument against OOP. All of a sudden, OOP doesn’t seem that bad if you’re aware of its caveats…

    Dwayne Charrington

    Written by

    Front End Engineer and ideas man from Brisbane, Australia. I blog here: http://ilikekillnerds.com