Click here to Skip to main content
15,895,011 members
Please Sign up or sign in to vote.
4.50/5 (2 votes)
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

I often just contract a short sentence...

Example:
C++
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.
 
Share this answer
 
Comments
Shaunak De 18-Sep-12 11:42am    
I follow this approach :)
A little typing today saves a lot of hair tomorrow!
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.
 
Share this answer
 
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.
Wiki[^] is always helpfull ;)
 
Share this answer
 

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900