Click here to Skip to main content
13,045,657 members (65,672 online)
Rate this:
Please Sign up or sign in to vote.
See more:
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
Updated 17-Sep-12 8:20am
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

I often just contract a short sentence...

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.
Shaunak De 18-Sep-12 11:42am
I follow this approach :)
A little typing today saves a lot of hair tomorrow!
Rate this: bad
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.
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 ;)

CPallini 18-Sep-12 3:13am
Thank you.
Rate this: bad
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)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170713.1 | Last Updated 17 Sep 2012
Copyright © CodeProject, 1999-2017
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