3 ms·
Nothing is added to C++ without demonstrating usefulness. There is no "language bloat". If you fail to find any of it useful, it can only be by not paying atten
by ncmncm 5y ago
Nothing is added to C++ without demonstrating usefulness. There is no "language bloat". If you fail to find any of it useful, it can only be by not paying attention.
Yes, you can limit yourself to the C and Java subset, just as you can drive everywhere in first gear, can eat all your food raw, can crap in a hole. Just because you can does not make it a good idea. Objectively, the more your code looks like C, the worse it is, because you are inviting into it all of the flaws endemic to C code.
- dralley 5y ago>> Nothing is added to C++ without demonstrating usefulness. There is no "language bloat" "Bloat" doesn't require that the features are literally useless, merely that their usefulness doesn't justify their added complexity. And for many people, a huge portion of C++ falls into this category. Just look at the 18 different methods of initialization for an example of this. Or look at ranges, which seem to simultaneously be far more verbose than the alternatives in every other language, while having measurable negative impacts on compile times (that have spread throughout the stdlib, so even if you don't use them you have to pay for them). Ranges are certainly "useful" but the cost/benefit ratio is questionable.
- ncmncm 5y agoRanges had to be implemented without using the new language features that would make it easy and clean. Its authors had to use template-metaprogramming substitutes that are slow. As the language implementations catch up, the library can be upgraded and will get faster to compile. There are new initialization modes that are simpler. The old ones still have to work. But you don't have to use the old ones anymore.