3 ms·
> I realized all this class-ification effort was pure waste, since most of it would never be reused. I don't think this is a valid take. Classes are not abou
by rewmie 3y ago
> I realized all this class-ification effort was pure waste, since most of it would never be reused.
I don't think this is a valid take. Classes are not about reuse at all. They are about encapsulation and specifying types/providing interfaces.
> Same with all the idiomatic conversions.
What's your complain about idiomatic conversions?
> Don't get me started on boost.
Why is Boost, or any library at all, relevant in a discussion about C++? Should our opinions on C++ vary if we mention POCO, Abseil, or even Qt?
Frankly, I don't think your personal takes are well informed. It sounds like you struggled to use something different than something you knew expecting that you could simply keep writing the same code in any other programming language, and subsequently started complaining that other languages are not like the one you used. That's hardly a critique of any other language, and instead it's insight on how developers who succumbed to crystallizing their expertise end up suffering from their inability to adapt.
- nurettin 3y ago> Why is Boost, or any library at all, relevant in a discussion about C++? I don't have a dog in this fight, but I've been following the scene since early 2000s, a lot of boost made it into the standard. FYI.
- gpderetta 3y agoYes, but it is for the better. Although it had the side effect of making boost less relevant.
- rewmie 3y ago> (...) a lot of boost made it into the standard. FYI. Some components that have been proposed to be admitted to the C++ standard were also contributed to Boost, but that's about it. There are far more components in Boost that were never even considered for the standard than the ones that were. Nevertheless, the relevant part is that Boost is not nor it ever was C++, or representative of C++. Conflating third-party libraries and frameworks with the C++ programming language is at best a pointless straw man.
- nurettin 3y ago> Some components that have been proposed to be admitted to the C++ standard were also contributed to Boost, but that's about it. Reality is: boost libraries were created, widely adopted, and once interfaces stabilized, we got technical reviews from wg21. Not the other way around. So the point is moot.
- ninkendo 3y ago> Why is Boost, or any library at all, relevant in a discussion about C++? It’s what the article uses to make its point. Did you read it?
- sgerenser 3y agoWorth noting that the article is from 2007. As of C++11 (from 12 years ago) you can write the equivalent code with just C++ and the standard library (range-based for loops, std:function).
- oweiler 3y agoClass composition is about reuse. Class inheritance isn't.
- raddan 3y agoThat may be the case in practice but it is not literally true, since semantically, inheritance is effectively a form of copy-and-paste in the compiler. It is literally about reusing components written elsewhere. I would argue that both are forms of code reuse, with the latter also having consequences for type checking.
- rewmie 3y ago> That may be the case in practice but it is not literally true, since semantically, inheritance is effectively a form of copy-and-paste in the compiler. No, not really. The whole point of inheritance is declaring new types by implementing specifying interfaces in a way that specify type hierarchies. If your goal was code reuse and "copy-and-paste" then nothing would beat composition. If you decide instead to go with inheritance, you have far more requirements to meet that go way beyond code reuse.