Many coding standards recommend using camelCase with lowercase initial for variable and function names. What is the standard practice if the initial should be uppercase for "grammatical reasons", e.g., because it is a name? For instance, shall I write KnuthPlassAlgorithm
or knuthPlassAlgorithm
?
Asked
Active
Viewed 1,115 times
1

Federico Poloni
- 668
- 8
- 24
1 Answers
0
It depends on your language and who you ask. Generally you "camelCase" local variables and "ProperCase" FunctionNames or ProtectedMemberVariables. Often people use an underscore then camel case for _privateVariables. If you want to not have to think about it and you are using VS and C# you should check out stylecop

John Sobolewski
- 4,512
- 1
- 20
- 26
-
Yes, but the question is another: what do people do when something that they should `camelCase` has its own other reasons to start with a capital letter? – Federico Poloni Jan 31 '12 at 18:05
-
Goodness. Sometimes I read what I think is there instead of what is written. Everything I have worked on has followed the naming rules not grammar. – John Sobolewski Feb 01 '12 at 18:26