4 ms·
Just my 2 cents from personal experience. > a) Functionality (does it work, is it safe?), b) Readability c) Conciseness d) Performance and e) Extendibility I
by MetroWind 6y ago
Just my 2 cents from personal experience.
> a) Functionality (does it work, is it safe?), b) Readability c) Conciseness d) Performance and e) Extendibility
I use a lot of library features after C++11. Variant, span, and string_view are the most important ones. As to language features, structured bindings and variable templates come to mind. They pretty much hit all of your code quality points. I don't think these are for "a small circle of language academics" either (I'm definitely not in that "small circle"). Syntax-wise, meta programming can get ugly yes. Even Stroustrup himself doesn't like it. I guess at this point it's just for "historical reasons".
> Using nonstandard extensions, libraries or home-baked solutions to run computations in parallel on many cores or on different processors than the CPU
I think this one comes down to that there are a vast range of parallel computing models out there, and C++ wants to have generality. I used to write a lot of MPI programs targeting the super computers. I don’t think any language would want to include that in the standard…
> Debugging cross-platform code using couts, cerrs and printfs
What’s wrong with printing? I even debug JavaScript programs with console.log(). It’s convenient.
If you just do local dev, debuggers work pretty well, you can debug however you want. I was unfortunate enough to have pretty much always worked on platforms that is hard to have a good remote debugging session, due to hardware capacity, legacy toolchain, or even ssh-ing onto the host being hard enough due to security. But that's hardly C++'s fault.
> Forced to use boost for even quite elementary operations on std::strings
It’d be great if std::string has more features. But I don’t think it a big deal. Personally I don’t like linking boost to my programs, so I just write my own libraries for that. It’s just elementary operations anyway.
- shaklee3 6y agoBut that's the point. Metaprogramming has gotten significantly better since c++11, and c++17 metaprogramming is extremely clean. Are we getting mad at them for improving things?