Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Anyone who disagrees with you is simply poorly read and uninformed?

You cannot separate theory and practice in the way you are attempting to. It’s not just “bad books” that lead to the abuse of inheritance that is so familiar, there were (and are) broken concepts that only became visible with time.

I highlighted “module” for a reason, because one of the key mistakes of practitioners was to view the element of re-use as the “class”. In reality if we want to create a reusable component the boundary is much higher. We create an api and a library or some other component that can be distributed.

Building a reusable component is much more work, and recognising when that is necessary and designing accordingly is an important engineering discipline.

To finish with a snipe of my own; I think people who take an OOP is primary view of the world need to do a little more programming in lisp to properly understand the fundamentals.



Your straw men fall easily. But your "snipe" doesn't even apply. I spent the two years of my masters program editing a NASA-owned LISP codebase. it wasn't huge. Maybe 100kloc. But I'm definitely not ignorant or LISP.

Look, you don't like OOP, who cares? I certainly don't. But that's different than trying to explain that you have a fundamental misunderstanding.

Whether you accept it or not, it's in your head now ;)


I’m too old and tired for the insult slinging anyway.

What’s my fundamental misunderstanding? What’s the straw man? Class == re-use?

I don’t hate OO by the way, it’s just not the first, only, or in my opinion best way to think about or structure code. I do think the expectations that OO would bring increased productivity, code-reuse, etc were not realised and hence why I referred to it as a “failed paradigm”. Not because it is bad from a theory perspective, but because in practice none/few of the things it was expected to deliver actually materialised. And also that the real challenges with “code reuse” are different. I have read the bad books, but also the good books.

I’ve done more OOP programming than anything else over my career, and it can be done well. I’ve also worked with and coded in extremely well written C code bases. I just can’t see the value that OOP provided over modular C. Perhaps you can enlighten me?


I can agree with a lot of what you wrote, and especially outcome vs. the original OOP promises. They meant one thing, and it turned out that thing is actually an anti pattern (inheriting implementations and state, not merely inheriting interfaces), but then they also delivered on what they said, just in a different way. Example: "we will have reusable code!" What they meant was deep inheritance hierarchies where children just inherit their parent code and selectively override parts of it. What was delivered instead was a set of principles using the vocabulary of OOP to guide developers into designing interfaces that are highly reusable (SOLID).

In terms of what this adds to C, I can only suggest that you study a large C project. I'd recommend the Linux kernel. You won't find first-class support for inheritance and polymorphism, but it's there. It is amazing how modifiable and extensible entire subsystems are, and when you examine it, you find the SOLID principles at work, which came from OOP study and practice.

I don't really understand what you mean by the way OOP is "structured." If you're referring to deep object hierarchies like Java or Qt, I don't really disagree. They attempt to force an architectural unity through object hierarchies. But then on the other hand, if you're saying that it isn't helpful to contemplate an architecture through the lense of types, the types of transformations and operations that can be performed on them, and packaging these operators and transformers into a group that can be passed to code that calls them abstractly, then I don't agree.

Amusingly, I don't think that second thing is what you're saying. But with your arguing against OOP, I don't really know how to interpret this. This is what OOP gave us language to describe. Of course some of these techniques existed before in LISP or C, but code bases of the day were largely NOT leveraging them in any large scale way. OOP gave us vocabulary for these concepts, as well as mainstreamed their use, similar to how functional programming mainstreamed the idea that a nonlinear or cyclic graph of executable functions must not allow shared state, even if hidden within objects, if you want to be able to maintain that code long term, and extend it. So it seems like you're arguing that OOP is bad, while neglecting the history that OOP brought us the common understanding of how modules should interact with each other.


I think we have been talking past each other to some extent. What you are defining as OOP is not what I think of as OOP. The concepts that you are referring to as valuable I agree with, I just think they are independent of OOP.

I have previously worked on very large C code bases (10m+ loc) that were well written. I haven’t worked with the Linux kernel, but the “SOLID Principles” and “modifiable and extensible subsystems” certainly were evident in these code bases. You claim that this form of programming came as a result of the study and practice of OOP, but I think this cannot be right. The ideas pre-date this. These code bases, pre-date this. Much of the literature from the 70s covered these topics.

I think what happened through the later 90s/early 2000s was that OOP was universally embraced, but without theoretical backing. C programmers picked up C++ (I was one), without really understanding, and the result was a mess. From there I think good practices were rediscovered, not invented. I don’t credit OOP for the good practices, although I don’t disagree that some truly new things have been learned.

However, I still have to deal with the poor practices within OOP. Developers inherit all the time for convenience. Rarely do they think in terms of interfaces/contracts at the modular level (why is this class public? *shrug* why isn’t this class sealed? *shrug*) It’s this sort of thing that makes me annoyed at OOP. To this day, developers still sometimes think of every class they write as being a “reusable” component, and this I lay at the feet of OOP.

Classes and Objects are sometimes useful. That’s what I think of as OOP, and that’s the bit that I don’t see as very valuable.


Guys, chill out.

"OOP has failed" should be read in context of the promise that everything can be effectively implemented with OOP, that you can make objects for everything and your entire program built out of it. The masses adopted it with pretty poor results -- and the poor results prompted people to say that "it has failed".

It just means that it has failed to live up to its promise. It does not mean OOP is not useful. Quite opposite, we have learned a lot about when it is very useful to use OOP. And also when it probably is a poor idea.

I personally mix and match OOP and functional styles. I will typically create objects to describe domain model because it is super useful to talk about operations on entities. But I will call these objects from functional context where it makes much more sense to create infrastructure from functions that can easily deal with different types of data.

No programming paradigm is clearly better than others and no programming paradigm is without flaws.

I would strongly suggest treating every person that says otherwise with extreme caution -- people tend to say these things at certain stages of their evolution as programmers until they have enough time to learn ins and outs of all things.




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: