Subject: Re: [boost] C++11 Metaprogramming
Date: 2012-04-06 06:45:27
----- Mail original -----
> De: "Andrzej Krzemienski" <akrzemi1_at_[hidden]>
> Ã: boost_at_[hidden]
> 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
> 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
> not master the subject.
> But looking at it from the fresh programmer's perspective, the fact
> the language requires "to specify whenever dependent names in
> contexts are anything else than values" means that the language is
> friendly to the fresh programmers (I understand that there are good
> for requiring this, but still...).
> Based on the Wkipedia's definition of "gotcha"
IMHO, a gotcha leading only to a compile time error is not really a gotcha.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk