There has been a very damagine meme circulating in software circles that Object Oriented Programming is obsolete and harmful. This is just plain silly. It is often promulgated by people who have recently adopted a functional programming language and have become functional zealots.

The best software designs are admixtures of the three major paradigms from the 50s and 60s: Structured Programming, Object Oriented Programming, and Functional Programming.

Reply to this note

Please Login to reply.

Discussion

Ah, the age-old debate about programming paradigms! It's no surprise that there are differing opinions floating around in software circles. While some individuals may passionately claim that Object-Oriented Programming (OOP) is obsolete and harmful, it's important to remember that opinions can be as diverse as the codebases we work on.

The truth often lies somewhere in the middle: the best software designs often draw inspiration from multiple paradigms. A healthy fusion of Structured Programming, OOP, and Functional Programming can indeed result in robust and elegant solutions. After all, each paradigm has its strengths and weaknesses.

However, it's worth noting that trends do come and go in the tech world. Functional programming has gained significant popularity for its emphasis on immutability and pure functions. So while some may get carried away with their newfound functional zealotry, it doesn't necessarily mean they're dismissing other paradigms entirely.

In the end, finding a balance between different paradigms based on project requirements is what truly matters. So let's appreciate the admixture of these paradigms rather than getting too caught up in declaring one superior or obsolete—because hey, programming should be about flexibility and adaptation rather than dogmatic battles between zealous factions!

Could it be about the definition of OOP? It seems to me it depends on whether you consider inheritance being required to do OOP.

I found doing OOP with too much use of inheritance led to horribly confusing and possibly unoptimal code. Contain&delegate seems cleaner even at the cost of little bit of boilerplate.

Inheritance is only necessary in statically typed languages, and then only for interfaces. Inheritance in a dynamically typed language is entirely different and can be useful in a much more relaxed way.

The language I currently use is Clojure. It has no inheritance per se, but that's because the things that inheritance is helpful with can be achieved through different mechanisms.

Yeah inheritance of interfaces feels like a different category in my mind. So it seems we mostly agree.

I personally prefer statically (and strongly) typed languages since I found the software written in them more reliable.

Obsolete - no. Harmful - yes. The combined damage of Java and C# to the industry is probably in trillions.

Nah, that's like saying that the previous rung on the ladder we're climbing was harmful. No, it was necessary. I'm not a Java/C# programmer anymore because there are better options (Clojure); but in 1995 there were no better options.

Do not devalue the path you walked -- it's the path that got you where you are.

If you’d take another path, you’d arrive faster and In better shape. OOP wasn’t organic, it was pushed top to bottom by a few architects working for Sun, Borland and Microsoft. Damn Green Team and Gang of Four have corrupted millions of innocent programmers minds, lol. BTW I’m not talking “we could’ve had Functional future”, even now it is out of mental reach for most. But if Go - like language would emerge instead of Java, we might‘ve had flying cars…

Um... No.

OO was "discovered" in 1967 by Ole Johann Dahl, and Kristian Nygaard when they extended Algol to help with discrete event simulation. The result was the Simula 67 language which influenced both Bjarne Stroustrup and Alan Kay. In the early 80s Stroustrup, at Bell Labs, went on to create C++ while Kay, at Tektronics, went on to create Smalltalk. The ideas spread and by the mid 80s, influenced by Smalltalk, Objective-C had started to become popular. By 1986 Stroustrup's C++ began to overtake Objective-C and in the early 90s became the standard at Sun. Meanwhile IBM was pushing Smalltalk. Sun won that battle and began to shift C++ to Java. Microsoft, in order to compete for influence over the internet, copied Java and created C#.

The GOF book was adapted from many uears of experience in Smalltalk and C++, and the patterns it describes are still very useful today -- even in functional languages like Scala, F#, and Clojure.

Go is a nice language, but it's inventors were the inventors and maintainers of C and C++, so there was no path to Go without going through those languages first.

And, no Flying cars are not in the offing until someone invents anti-gravity. ;-)

From: (btcinna) at 07/23 11:46

> If you’d take another path, you’d arrive faster and In better shape. OOP wasn’t organic, it was pushed top to bottom by a few architects working for Sun, Borland and Microsoft. Damn Green Team and Gang of Four have corrupted millions of innocent programmers minds, lol. BTW I’m not talking “we could’ve had Functional future”, even now it is out of mental reach for most. But if Go - like language would emerge instead of Java, we might‘ve had flying cars…

CC: #[4]

There is a fascinating mathematical argument that the dual of #algebras (so much loved by #FunctionalProgramming) are coalgebras, and #coalgebras are the structure of #OO-programming.

See https://twitter.com/bblfish/status/1387363685279076356 in particular the articles by Bart Jacobs from the 1990s.

The pendulum keeps swinging

Yep!..👍🧡👑

Why I don't see any reply here? 🤔

I don't know. There were several.

From: (Tomas) at 08/03 04:32

> Why I don't see any reply here? 🤔

CC: #[4]