4 ms·
> Does anyone have an example of a large codebase that actually uses modern C++ to its fullest? The point of a language is not to use all the bells and whistle
by rumanator 6y ago
> Does anyone have an example of a large codebase that actually uses modern C++ to its fullest?
The point of a language is not to use all the bells and whistles just for the sake of playing language feature bingo. The point of a language is to offer developers the tools they need to use to achieve their goals. Some C++ standards offer stuff that are must-haves, nice-to-haves, and meh. Just because you want to use std::make_unique that doesn't mean you should rewrite your code to get all your lambdas to do return type deduction.
- atombender 6y agoSorry, that's not an answer. I'm asking whether there are any projects that use modern C++ to its fullest. By fullest I don't mean using features for features' sake; that's a ungenerous reading of my comment.
- rumanator 6y ago> Sorry, that's not an answer. I'm asking whether there are any projects that use modern C++ to its fullest. That's precisely the answer, because the question, as you framed it, is absurd. The point of using a language is to benefit from the features it provides. It makes absolutely no sense to argue that a language is not used "to its fullest" if you don't play feature bingo in your projects. That's silly. I'm using C++14 to its fullest if I use std::make_unique even if I use no template metaprogramming or lambdas or even throw exceptions. It makes no sense to argue otherwise.
- atombender 6y agoThat's still a non-sequitur. As an counter-example, it's possible to write conformant C++ without using any features that aren't also in C: I am, objectively, not using C++ to the fullest if I'm restricting myself to functions instead of methods, char pointers instead of std::string, statically allocated arrays or pointers instead of vectors, and so on, thereby ignoring 90% of the spec. If I'm not using constexpr, for example, then I'm using one of less feature provided by the language. Constexpr, like all other modern C++ features not present in "old" C++, was invented to serve a purpose, and without it, you have to reach for more blunt, possibly more verbose and less expressive tools. In other words, many new features (such as ranges) increase expressiveness in a quantifiable manner. I may not need, for the specific program that I'm writing, the full range of features, and may not need constexpr. But that wasn't the question. Again, I'm not asking about egregious use of features of features' sake. I'm asking about examples of projects that use in a positive and not superfluous terms modern features of C++. It's not an absurd question, and your response is just obtuse (and unhelpful!).
- pjmlp 6y agoC++/WinRT for UWP makes use of advanced C++17, not sure if that is using C++ at its fullest whatever that means. Same thing applies to SYCL, CUDA and Metal Shaders (MSL uses C++14 though).