Click here to Skip to main content
11,409,097 members (63,891 online)
Rate this: bad
good
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 9:18am
tomay30001.2K
Edited 17-Sep-12 9: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 at 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 at 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 at 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
0 OriginalGriff 330
1 Sergey Alexandrovich Kryukov 310
2 Maciej Los 155
3 Peter Leow 130
4 Dave Kreskowiak 115
0 Sergey Alexandrovich Kryukov 8,676
1 OriginalGriff 6,855
2 Maciej Los 3,322
3 Abhinav S 3,238
4 Peter Leow 3,034


Advertise | Privacy | Mobile
Web01 | 2.8.150414.5 | Last Updated 17 Sep 2012
Copyright © CodeProject, 1999-2015
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