DEV Community

Discussion on: The scientific proof of that OOP is a mass psychosis

Collapse
 
polterguy profile image
Thomas Hansen • Edited

I understand that if you are not familiar with C++, the syntax and concepts might be confusing, but we're talking professional development by people who understand their tools

I am familiar with C++. I think I'm attributed in the C++ std in fact - At the very least Bjarne Stroustrup used to link to my C++ GUI library (SmartWin) from his home page. I have barely touched upon it since 2008 though. I checked it up a little bit in 2016, at which point I was amazed by its lambda features, and other "functional features" - All of which are arguably ripoffs from FP. However, C++ gives me a headache, because keeping a reference to a destroyed object yields unpredicted results, dereferencing a deleted pointer results in (God knows what), and it's got way too much complexity to do even the simplest of things.

I have the same relationship to C++ (and OOP in general) as I do to having brain surgery. I'll do it if I have to, but I'll do everything I can to avoid needing it ...

Collapse
 
wesen profile image
Manuel Odendahl

Memory ownership is at this point a reasonably well solved problem. You can use unique_ptr or the plethora of other smart pointers. As for c++ having anonymous functions, that indeed cuts down on boilerplate. There's a discussion to be had on how much modern c++ and the STL really are "OOP". I personally don't use the STL and stick with a more traditional "struct with methods" approach, leveraging the template system to strongly enforce invariants at compile time.