4 ms·
> The connection between C++ and OOP is because OOP was the insane hype at the time when C++ was being invented. Not really, the C++ OOP features were directly
by 0815test 7y ago
> The connection between C++ and OOP is because OOP was the insane hype at the time when C++ was being invented.
Not really, the C++ OOP features were directly modeled after very similar features in Simula. C++ was specifically designed as a way of bringing these sorts of features to C, although it did include other improvements to the language as well. Templates and the STL as we know it were a relatively late addition to the language.
It's also worth mentioning that there's only a handful of things about OOP that could be genuinely considered "a code smell"; in fact you could restrict that concern to one feature, viz. implementation inheritance. Object-based programming which follows the "composition over inheritance" guideline can still broadly tap into the improved-modularity benefits that 'objects' are generally known for.