
----- Mail original -----
De: "Andrzej Krzemienski" <akrzemi1@gmail.com> À: boost@lists.boost.org Envoyé: Vendredi 6 Avril 2012 12:26:23 Objet: Re: [boost] C++11 Metaprogramming
On 06/04/12 09:04, Andrzej Krzemienski wrote:
And this is the worst part: I forgot the "typename". Having to type this "typename" is really terrible and just scares off many people. If you do not mind it, it only means that you got used to it; but people should not be forced to get used to too many gotchas.
The language requires to specify whenever dependent names in template contexts are anything else than values (i.e. types or templates).
There is no substitute for learning the basics of the language. This is not a gotcha, just normal usage of templates.
Clearly, if you do not find requiring of the programmers to type this "typename" in these places even slightly wrong, you will not appreciate alias templates as a useful addition to meta-programming. Also, if you did a lot of advanced meta-programming, you have probably mastered the rules of template syntax, and find it difficult to sympathize with those that did not master the subject.
But looking at it from the fresh programmer's perspective, the fact that the language requires "to specify whenever dependent names in template contexts are anything else than values" means that the language is not friendly to the fresh programmers (I understand that there are good reasons for requiring this, but still...).
Based on the Wkipedia's definition of "gotcha" (...)
(off-topic) IMHO, a gotcha leading only to a compile time error is not really a gotcha. Regards, Ivan