Said another way: writing is ugly, and reading is inscrutable.
I'm not sure there's strong evidence (certainly none presented) about performance, etc
Said another way: writing is ugly, and reading is inscrutable.
I'm not sure there's strong evidence (certainly none presented) about performance, etc
Truth be told, the syntax is not complicated. What's complicated is how templates are abused to do stuff that wasn't identified in the feature's initial design requirements.
Debugging is an implementation issue, not a language design issue.
Templates are awesome. STL's generic containers are a blessing to the point where they can be used in practically all applications without the developer giving a second thought.
I have very limited exposure to C++, so I'm not sure whether you're saying that some implementations have gotten this right. That isn't the impression I get as an outsider.
I recall a time where GCC's error messages were infuriatingly cryptic.
Then clang came up, and suddenly cryptic error messages were not only clear but helpful in identifying root causes.
If your line of thought made sense, C++ would have been an awful language until clang fixed it.
Don't confuse "implementation X didn't bothered to pay attention to a feature" with an issue in how a language was designed.
So the question is whether these template issues are found in every implementation (language design issue) or only some (implementation issue).
std::vector<std::pair<std::string, std::string>> vec;
anything involving nested namespaces and template parameters gets out of control really fast. the textual inclusion paradigm means I must declare the vector this way unless I want to inject everything from std:: into any source file that includes the header.I'm not sure what GP means about debugging. in my experience it's just like any other language if you have symbols and minimal optimizations. it can be kinda weird with optimizations, but that's to be expected. if the compiler can optimize away entire blocks of code, I don't think a debugger can abstract over that.
typedef std::pair<std::string, std::string> TStringPair;
std::vector<TStringPair> vec;
or maybe: typedef std::vector<std::pair<std::string, std::string>> TStringPairVec;
TStringPairVec vec;
this improves readability a bit, but is even more verbose at the declaration site if I'm not reusing the typedefs elsewhere. in an ideal world, I'd like something analogous to #undef for `using namespace` (or better yet, have this be the default at the end of a header file). this is only scratching the surface of the gotchas that come from textual inclusion.