Hacker News new | ask | show | jobs
by SNBasti 3383 days ago
Adding my two cents :

To some point I can follow the argumentation of the author. However, I do not see any superior alternative to the OO paradigm especially combined with Unit testing. Thus, HN, what are the alternatives to OO ?

2 comments

I think there's a sentiment that OO means deep type hierarchies and using inheritance a lot. Instead of an alternative, per se, people prefer to keep type hierarchies shallow and preferring composition to inheritance to prevent overspecification of types and retain flexibility in the architecture.

In this sense, I think there's a distinction between textbook OO and cultural OO. One is a benign tool in a toolbox that you can reach for and the other is <strawman>when people reject merge requests because 'it looks like type A 'is-a' type B. So make it inherit </strawman>'.

procedural / functional / declarative / concatenative

I would not call these alternatives, as others have commented these are all tools, no one is superior. In my opinion, C++ is a failure. I wouldn't call Object Oriented a failure. I do think OO could be way better.

I've been studying about C++ lately. It has proven to be a lot harder to learn than PHP, JavaScript, Java, C# and Haskell. It's one of the most powerful and widely used languages around however, so calling it a failure seems rather unfair.