Click here to Skip to main content
12,457,493 members (54,194 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: C++ C
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 17-Sep-12 8:18am
tomay30001.3K
Updated 17-Sep-12 8:20am
v2
Rate this: bad
 
good
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.
  Permalink  
Comments
Shaunak De 18-Sep-12 11:42am
   
I follow this approach :)
A little typing today saves a lot of hair tomorrow!
Rate this: bad
 
good
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.
  Permalink  
Comments
losmac 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: bad
 
good
Please Sign up or sign in to vote.

Solution 2

Wiki[^] is always helpfull Wink | ;)
  Permalink  

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

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web01 | 2.8.160826.1 | Last Updated 17 Sep 2012
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

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