Why Object Oriented Matters

The Sharp Ninja
5 min readDec 3, 2018
Go to the profile of The Sharp Ninja

Right now functional programming is all the rage. Languages like Haskell and Javascript are hip. While Javascript can be mostly object-oriented through languages like TypeScript, doing objects in Javascript is becoming less common because of the rise of functional programming.

Proponents of functional programming tout things like pure functions making testing easier and immutability reducing side-effects and more. This is all fine and well, but it ignores the biggest reason to use Object Oriented. The world is made of objects, not linear functions (well, not exactly, but a linear function that can accept all the parameters of the world would be completely unmaintainable).

Using Object Oriented Programming (OOP) is essentially creating a system that defines what is to be done (Interfaces/Abstract Classes) and how it is done (Concrete Classes). OOP breaks down an system into contracts that define interaction, and implementations that perform the actions. Objects in both OOP and the Real World interact with each other through a definable set of conditions based on Use Cases and normal behaviors, and returning exceptional behaviors as Exceptions. Pure Functions cannot express ambiguity since ambiguity is a side-effect.

For over 100 years we have had telephones. Although technology has changed dramatically, the use cases of the telephone have…

--

--

The Sharp Ninja

20+ years of professional software engineering has taught me a thing or three…