5 ms·
The language is getting better with variadic templates, range-based loops, auto keyword...
by vmorgulis 11y ago
The language is getting better with variadic templates, range-based loops, auto keyword...
- catnaroek 11y agoIt's certainly getting more expressive. “Better” is subjective, though - IMO, there ought to be more convenient ways to achieve everything C++ can do.
- vmorgulis 11y ago> IMO, there ought to be more convenient ways to achieve everything C++ can do. Yes, it's my opinion too. C++ remains the fastest language mainly because of the compilers. That's why I still use it. Rust is a challenger. My knowledge of it is very limited but I'm not sure if its improvements will be enough to replace C++.
- catnaroek 11y agoRust is already better than C++ for those use cases that normal, idiomatic C++ serves [RAII, templates only used for (bounded) parametric polymorphism]. However, for metaprogramming, C++ still has an edge over Rust: C++ templates are more powerful than Rust macros, and more convenient to write thant Rust compiler plugins.
- munchbunny 11y agoC++ is one of those "does everything" languages. You can do everything from high level, garbage collected code, down to inlining assembly. The level of explicit control and setting up your own abstractions is really powerful. It comes with very high shoot-yourself-in-the-foot potential, but most people don't accurately assess that cost. I'm sure other languages or combinations of languages will be able to supplant C++ eventually, but the combination of inertia and some of C++'s niche capabilities, plus its extensively optimized compiler support, makes C++ just a generally hard language to replace.
- deleted 11y ago[deleted]
- cousin_it 11y agoAnd soon we will find out what magical things happen when you combine these new features with old ones in unexpected ways.