Click here to Skip to main content
14,297,293 members
Rate this:
Please Sign up or sign in to vote.
See more:
Hello,
I want to know if there is a convention about choosing the best English names for functions and keywords declaration.
I spend many time to make a decision to name a function or a keyword in C or C++ programming, because my English is poor and there are many synonyms in English.
Of course there are Boolean names that begins with Is or Can or Has or any other Boolean expression.
What to choose when there are synonym words (ie. Display and Show) !?

Thank you for your understanding
Posted
Updated 17-Sep-12 8:20am
v2
Rate this:
Please Sign up or sign in to vote.

Solution 1

I often just contract a short sentence...

Example:
size_t NumberOfFilesProcessed;


If I come back to this code after a long absence, it's still clear exactly what the variable is intended to represent.
   
Comments
Shaunak De 18-Sep-12 11:42am
   
I follow this approach :)
A little typing today saves a lot of hair tomorrow!
Rate this:
Please Sign up or sign in to vote.

Solution 3

I think:
  • You are not alone (many of us have the same problem).
  • Both display and show could make sense (I suppose some libraries use the former while others use the latter). This is a typical scenario, because synonyms are, well, synonyms...
  • That is: precision is always good anyway I wouldn't bother too much.
   
Comments
Maciej Los 17-Sep-12 16:41pm
   
I like this answer, because it's... friendly in every single aspect. And the best is on the end ;)

+5!
CPallini 18-Sep-12 3:13am
   
Thank you.
Rate this:
Please Sign up or sign in to vote.

Solution 2

Wiki[^] is always helpfull ;)
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100