3 ms·
>> Nothing is added to C++ without demonstrating usefulness. There is no "language bloat" "Bloat" doesn't require that the features are literally useless, mere
by 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.