Hi, On Tue, 25 Sep 2012, Lawrence Crowl wrote:
> On 8/15/12, Richard Henderson <r...@redhat.com> wrote: > > On 2012-08-15 07:29, Richard Guenther wrote: > > > + typedef typename Element::Element_t Element_t; > > > > Can we use something less ugly than Element_t? > > Such as > > > > typedef typename Element::T T; > > > > ? Given that this name is scoped anyway... > > I've been finding the use of T as a typedef confusing. Why? As type placeholder in templates it's quite customary, as the "most interesting to users of this template". I would have no trouble at all to see declarations like "T x = getme();" in a function. In some way I even prefer that to some lower-case variant, because it reminds me that this specific "T" is actually variant. A lower-case type name indicates to me a non-changing type, i.e. nothing that depends on a template. In C we only had such types so we used lower-case names everywhere. With C++ and templates I think we should start using upper case for some very specific use cases, like first letter of dependend types. > It sort of flies in the face of all existing convention. If you talk about the conventions used for the c++ standard library, then they are IMHO quite ugly and we should not follow them. Ciao, Michael.