Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 157895
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T10:35:08+00:00 2026-05-11T10:35:08+00:00

Traditionally, the names of template types are just a single upper-case letter: template<class A,

  • 0

Traditionally, the names of template types are just a single upper-case letter:

template<class A, class B, class C> class Foo {};  

But I hesitate to do this because it’s non-descriptive and hard therefore to read. So, wouldn’t something like this be better:

template<class AtomT, class BioT, class ChemT> class Foo {};  

I also tend to think the following would not be a bad idea:

template<class ATOM, class BIO, class CHEM> class Foo {};  

It makes them stand out (and also, it’s upper-case letters again). What’s your opinion?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T10:35:09+00:00Added an answer on May 11, 2026 at 10:35 am

    For C++ templates I have a couple of patterns

    If there is just a single template parameter, I name it T (or U,V for nested templates).

    When there are multiple parameters and the use is not immediately obvious then I use descriptive names prefixed with T. For example, TKey, TValue, TIdentifiier, etc … This makes the parameters fairly easy to spot throughout the template usage.

    I would avoid the all upper case version though. Most people use all upper case identifiers in C/C++ to represent a macro definition. Repeating that pattern for a template parameter is likely to confuse people down the road.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

A traditional C++ class (just some random declarations) might resemble the following: class Foo
I know this sounds backwards but I would like to be able to determine
I traditionally work in VB.NET, but have been asked to code the latest project
Traditionally when using a DbCommand when retrieving data from a sproc, something like the
Traditionally, we try to avoid LazyInitializationException s. However, I need to temporarily allow them
I'm traditionally a .NET developer and am spoiled for choice when it comes to
I have a pretty common layout issue that I have traditionally used a table
I have a traditional ASP.NET GridView. Inside of it I have a Template Field
I have a collection of PHP classes that can be instantiated traditionally using constructors.
This concerns sql show queries. The following query below works the issue is it

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.