Object oriented programming deemed irrelevant
I've been coding since 2006, during this time I've seen multiple trends & technologies emerge, rise and fall - nowadays the elephant in the room is the bad press around OOP languages the likes of Java, C#, C++.
Our profession is no stranger to this kinda of feud and debate, for example, at the start of my career I learned and was told to quickly forget Remote Procedure Calls technologies like CORBA, SOAP with the bulk of what we called Web Services at the time - (spoiler: it came back with gRPC useful things tend to come back).
I was only told at the time that my job as a software engineer was going to be irrelevant soon enough because of MDA - Model Driven Architecture - and if I wanted to really build things my goal should be to harness all the UML/Merise diagram types perfectly and then feed them all to Eclipse EMF (still alive btw) for it to generate the code (like a good engineer should because *really doing things* is kinda dirty anyway).
OOP and programming languages
One thing that was a given at the time was the clear win of the Object Oriented programming languages for “serious work” - C was already considered too low level - so the clear go-to languages built from the ground up with OOP in mind were Java, C# and C++.
All the other languages wanted in on the action and added some concepts of Classes afterwards some in a clunky limited way like PHP and some with more attention to details like Python.
Fast forward to now
Nowadays OOP is the bad guy, the one responsible for all the evils in this world (along with Waterfall, Agile, Web Services and Design Patterns). To be clear it is denigrated in the tech news and as a general consensus in the ecosystem considered too expensive, too bloated (special mention for the epic The faster you unlearn OOP, the better for you and your software) and a waste of precious time creating more problems than it solves, especially with the challenges we face nowadays (efficient multicore usage, async/data-intensive applications, deep integration with Machine Learning and distributed systems to mention a few).
Ok it looks like a grim picture, let's take a step back and look at what people actually do, and if we take a look at the Stack Overflow developer survey of 2023, it checks out, the most popular and widely used programming languages today are not object oriented from the ground up - they are all scripting languages (except SQL) :
The same conclusion can be drawn if we take at the Stack Overflow developer survey of 2024 :
However if we take a look at the number of years of experience of the respondents we can see some biais in the datasets the bulk of respondents being <10 years experience on the job while according to DataUSA the average age in the industry is as of 2022 39 years old
And it's easy to see this self-fulfilling prophecy in action with the majority of bootcamps and influencers supposed to help you get a 6 figure job in tech in 4 days tell you that learning JavaScript is the best way to become a FullStack Engineer ever because you can use it on both the frontend and the backend (🤯 !) and Python the best way to get into DataScience (hard to argue about this one...).
So yes, the lingua franca of new developers is now closer in terms of paradigm to a (mostly) dynamically typed - imperative style of programming and it seems, as a whole, experienced developers stayed loyal (PyCon or Devoxx conferences still see ~5000 participants per day each year and JavaOne (rebranded DevNexus) in the USA sees ~10k participants per day) or moved *laterally* :
- some experienced developers in OOP languages have moved on to functional programming languages to overcome some of the trauma they faced
- others moved on from strict Java / C# etc... to Kotlin/Scala or other more modern forms of the language while Java integrated some of these features to stay relevant and dominant (Streams, lambda, default implementation etc...)
Finally the emergence of a new brand of lower level languages like Go and Rust means that even some of the newcomers had additional options to shield themselves from the “enterprise languages”.
Where to go from there
There now seems to be a schism between older generations of programmers and newer generations, the later disregarding for the main part all the teachings (the bad and the good) that object oriented programming brought to the table.
Now let's be frank, none of the concepts that OOP pushed for are special to these languages especially in the later years :
- the simple fact of defining Abstractions (not too much, not too little) and following the Dependency Inversion Principle
- the single responsibility principle
- the encapsulation habit
- the composition over inheritance principle
Or as we now say broadly following the SOLID principles, none of these concepts are things that you can only do with classes, inheritance or a stubbornly opinionated Object Oriented programming language.
As a side note, most of the time it's easier to follow the spirit of these principles in a functional programming language, but amongst the list of popular programming languages they are notoriously absent, the closer we'd get is that some of these languages have “functional programming features” like first-order functions, map, filters and that's it.
OOP has died many times in the past it has however survived until today but in other forms. We still call this by continuity OOP each time mostly because OOP has always been very loosely defined - the projects we build today using OOP languages and frameworks do not use as many abstractions, layers of indirections, overrides or even overloads than when the hype was at its peak, and it's a good thing! For simplicity is always a good thing!
This lack of definition is even clearer if we go back to Alan Kay the creator of SmallTalk who coined the term “Object Oriented Programming” when he meant to say the following :
“OOP to me means only messaging, local retention and protection and hiding of state-process, and extreme late-binding of all things.”
None of the current leaders in OOP are message-passing oriented (sadly), yet we consider them object oriented.
I do not care that much for the survival of OOP but I do see the value in the core teachings and the values in terms of separation of concerns it brought us - the efficient tooling and compilers that have been developed and refined for the last 30 years. We, as a profession, are not doomed to repeat the cycle of hype, fame, banishment and rewrite, I've already experienced multiple times in my short career.
We should encourage all software engineers to strive for knowledge, learn, and develop critical thinking rather than forget all kinds of rational behavior, considering only the hype and prejudice of our times - in the end, even “old” programming languages and paradigms can be relevant today for the objectives we all have; to stay sane in a convoluted codebase.