Taxonomy of Programming Languages
What is object-oriented, functional and procedural programming languages? How do we go about categorizing them?
For those of us with some passions for programming languages, a frequent debate that flares up, is what specifically should be categorized as object-oriented and functional?
Is C++ object-oriented? “It allows free functions!” Pedantic people in the early 2000s would get hung up on details like that. We have a similar situation with functional programming even to this day where people will insist that anything which allow mutation of state is automatically disqualified as a functional language. This leads to absurdities where LISP is no longer a functional language.
Object-oriented programming has rightfully been criticized over the last years, but a lot of the pushback against this is based on the idea that this isn’t “real” object-oriented programming or this is class based object-oriented programming.
This is a universal problem in any categorization. You see exactly the same in political science: “But that isn’t real capitalism, that is crony capitalism,” or alternatively: “That isn’t real communism, that is Stalinism.”
It is not that any of these people are technically wrong, but we need to deal with the real world as it exists. The old greeks such as Plato obsessed about idealized shapes or forms. That every real object had some corresponding perfect representation. An ideal form. This focus on how things should be rather than what they are led to absurdities such as early surgeons insisting the inside of a human body was wrong, because it didn’t match the descriptions given by the old greek philosophers.
It is on par with insisting the landscape is wrong if the map does not fit. We are in a similar situation with programming languages. We can define idealized forms of functional and object-oriented programming. Just as in theory we could create idealized animals and arrange them in neat logically consistent hierarchies.
Yet in the real world we don’t have idealized animals. We have the messy reality. The same goes with programming languages in the wild. It is a mess. One could create beautiful and logically consistent organizations of theoretical animals but what is the value? Taxonomy must have some practical application. Taxonomy exists to help us navigate and make sense of a messy world.
In my opinion, the same applies to programming. Labels such as functional and object-oriented should not be merely theoretical constructs but have practical application. This should allow us to organize languages into families the way we organize animals into different groups in biology.
And thus what pioneers such as Alan Kay may have thought about object-oriented programming in the past isn’t all that relevant. If no language today really fits the description or almost all do, then it isn’t all that useful. Labels aren’t very useful if they cannot be used to lump things into practical groups.
Whatever Alan Kay wanted object-oriented programming to be, it clearly took a life of its own, and developed its own philosophy and class of languages. These may not have fit his vision, but that is how the world works. Meanings change. “Gay” no longer means cheerful and carefree.
Object-oriented programming today is synonymous with class based object-oriented programming. But even if one uses prototype based languages, then implementation inheritance is still a key part of object-oriented programming which distinguishes from other types of programming.