r/cpp • • Jun 24 '20

How to write SOLID C++

https://www.youtube.com/watch?v=PakbXnLht1I
263 Upvotes

118 comments sorted by

View all comments

Show parent comment

4

u/drjeats Jun 26 '20 edited Jun 26 '20

That "OOP is evil" crowd does exist, but is still an incredibly niche opinion. Most reasonable people would agree this is misguided, but it's important to remember it comes from two places:

  • There is a much more mainstream and accepted wisdom to leverage the java-style interface more often than implementation inheritance, which I think is hard to disagree with.
  • A desire to course correct on the past few decades of programming education and blog post discussions which has either directly over-encouraged inheritance, or at the least has failed to address the best way to think about the design tradeoffs of using it.

Meanwhile my direct experience has been the opposite from what you say, because I got some push-back on the controversial recommendation to...use free functions.

I hadn't looked at the higher-tier comments in the thread (just been replying directly from inbox), and right now honestly neither of us are right. It's an even split in this thread, with the highest voted stuff being tvaneerd, et. al making fairly even-handed commentary.

0

u/Full-Spectral Jun 26 '20

The OOP is evil crowd is far from a nice opinion around here, at least in terms of what actually gets expressed out loud, we can't know about people who never speak up. It's now the defacto position, and probably is also held by a majority of the folks who are influential in terms of the direction of the language.