This is your brain on OOP

OOP and cults have many of the same effects on the human brain. In a cult there is always one right answer, to most questions you can ask. OOP has these same traits.

If you study a cult, and believe in its dogma, your cognitive abilities changes. Few can doubt this simple fact. Arguably, the same is true for Object Oriented Programming. OOP changes your brain’s ability to see nuances, and makes you want to classify everything into “car”, “house”, etc. Cults work the same way, with their methods of classifying everything into either evil or good – While the truth is that there are always nuances, which both cults and an OOP mind tends to miss.

OOP was invented by two Norwegian professors in 1967, in the programming language referred to as “Simula”. I suspect this was not a coincidence, since in OOP, versus a more functional programming language such as LISP – There always seems to be exactly one right answer to any question you can ask. This made it easier for these professors to hand out grades, since they could just compare their student’s answers to “the correct answer”, and such make their own jobs easier.

The problem with this, is that just like all cognitive frameworks, which arguably OOP in its nature is – It also changes our brain’s ability to function at its peak level. Hence, OOP is arguably damaging to our brains, the same way joining a cult, or taking drugs for that matter is. Hence …

This is your brain on OOP

Kids, don’t do OOP!

Psst, there exist alternatives … 😉


OOP sucks

This is your brain on OOP

Sorry, somebody needs to say this out loud, if not for any other reasons than to balance the debate. When I say OOP though, I don’t actually mean OOP. I mean the way it has been traditionally implemented, in languages such as C++, C#, etc. And facts of the matter is, that this way of thinking about object oriented programming seriously sucks!

First of all, it puts your mind into a rigid mindset where everything needs to be classified in order to have function. Secondly, it forces you to compile every single different type of classification you create, making your program incapable of creating new types during runtime. Which I kind of touched upon indirectly here. And since the obvious conclusion of the Liskov Substitution Principle is that no types can be inherited from any other (complete) type, 50% of the reasoning for using OOP in the first place, simply vanishes!

At least in JavaScript your objects are more fluent, and can be modified during runtime. Prototype-based OO is at least one step in the right direction. But even this way of thinking about objects is too rigid. In fact, any language that is dependent upon the programmer to utilise “design patterns” to fully take advantage of the language, is by the very definition of the term flawed!

7 years ago I tried to write my first MSDN article. Back then I referred to my (immature) method of thinking about objects as “O2”. I still kind of think about my method of creating software as the next paradigm, or OOP evolved. Here you can see my final draft for my article, that was published in MSDN Magazine in March this year. That article was amongst one of the top 20 most read articles in MSDN Magazine for the last 7 years. Which clearly speaks to the fact of that I was able to touch a nerve.

What I did with Active Events, was basically to move polymorphism out of the class constructs, eliminate all types except one (lambda), and eliminated the difference between “data” and “functions”. This allowed me to create software dynamically, in a way that is impossible to understand for people who have been stuck in the OOP paradigm for most of their lives. This way of looking at your code, resembles the real world much more closely. When you need 5 years of learning how “classes works”, simply to be able to create a simple “Hello World” application, without breaking the rules of encapsulation, cohesion and LSP – There is something seriously wrong with your paradigm!

We should warn our kids, with posters like “this is your brain, this is your brain on OOP”. Because a world where all of our children has been raised on OOP, and the insane obsession for classification, is simply not a nice world to live in. Sorry guys, somebody needs to say this out loud, and what needs to be said, is that OOP sucks!