3 ms·
I think what he says about C++ to a lesser or greater extent applies to most OOP languages, especially if speed is a concern. After a quarter century of OOP, in
by mnm1 8y ago
I think what he says about C++ to a lesser or greater extent applies to most OOP languages, especially if speed is a concern. After a quarter century of OOP, including years with C++, I still do not understand why it exists or what problems it actually solves. I understand the problems it tries and pretends to solve but that's not the same thing. I still do not see the advantages (as opposed to "advantages") and the disadvantages of the approach are huge and glaring. I think the rise of OOP has led to a lot of programmers who don't know what they're doing because the languages themselves are created in such a way as to encourage bad practices like inheritance and make good practices like composition not obvious or intuitive.
- staticassertion 8y agoEncapsulation. Hope this helps.
- opless 8y agoI'm not sure you know what you're talking about here. If you want to see what OO-in-C might look like, look at golang's object model. You lose some bits of OO design, but many folk just don't need/want them. Exceptions, deep inheritance, etc. Don't get me wrong, I'm well versed in C++/C#/Java, but you can quite easily paint yourself into a corner if you're not careful. C programming requires much more careful thought, and that's probably why Linus isn't too keen on the OO crowd, as that's where, in his opinion, the sloppy programmers have wandered off to.
- staticassertion 8y agoWhy are you even talking about C let alone OO-in-C? > After a quarter century of OOP, including years with C++, I still do not understand why it exists or what problems it actually solves. This is what I was responding to.
- waynecochran 8y agoAny decent GUI API will be OO. It is the right paradigm for that. Abstract Syntax Trees for language translation is another problem where OO is a great choice. Simulation is another good fit.