>>67
I agree with you there.
typename is simply a cue for the parser to be able to parse the grammar, useless to the programmer. Template parsing yields ambiguities, and the way C++ solved it is hinting the parser with extra tokens to avoid reduction conflicts. This is one huge wart in my opinion.
Nonetheless, G++ and MSVC are able to parse the code
without the
typename keyword prefixing a dependent type whatsoever. Maybe these usages will futurely disappear.
Some choices for keywords in C++11 sounds ridiculous to me too.
nullptr,
decltype,
typename and more. This obsessive need to have a single-pass compiler (forcing the language to be polluted with non-intuitive syntax) is also a botch.
However, when people don't like something, they should manifest the discontent in order to yield changes. In my humble opinion, C++11 could have been
much better if the
community -- not the language, not the technical needs -- behaved better during these ten years the language gained popularity, both C++ aficionados and C++ haters. Aficionados behave as if they were programming gods, praising complexity and further legitimizing the criticism the C++ haters themselves shoot against them.