Is it more difficult to parse the syntactic structure of C++ than other languages?
c++, code-completion, ide
Solution
Parsing C++ is more difficult, because the grammar is very stateful. Knowing whether `A * b;` is a pointer declaration or multiplication depends on whether the identifier `A` in the current scope refers to a type or variable.
But it's not just parsing. Autocompletion requires semantic analysis, overload resolution, template expansion, selection of template specializations, evaluation of constexpr functions since they can appear in template argument lists...
Basically to determine the type of an arbitrary C++ expression and list the members of that type, you need all of a non-optimizing compiler except the machine code generation.
Most of the above steps don't apply to languages that don't have template specialization.
Problem
I have observed that almost in all IDEs code completion for Java and C# is better than that for C++. For example, in Netbeans, Java auto-completion is far superior to C++ auto-completion, while in Visual Studio, C# auto-completion is way better that Visual C++. There are tons of IDEs out there offering very good Java auto-completion, but the same is not true for C++, even though it is the older language. Is it more difficult to parse C++? If so, why?