Practice of writing compound words where the first letter of an identifier is lowercase and the first letter of each subsequent concatenated word is capitalized.
Questions tagged [camelcase]
7 questions
80
votes
7 answers
How to write camel case for words like "phonenumber", "motorcycle", "wavelength", etc
I am having a problem in understanding how to apply camelCase syntax to some of my variable names.
For example, how should I correctly write a word like "phonenumber" in camel case? Is it phoneNumber or phonenumber? Similarly with "username", is…

Niklas Rosencrantz
- 8,008
- 17
- 56
- 95
66
votes
4 answers
What's the dominant naming convention for variables in PHP: camelcase or underscores?
The consensus seems to be that one should follow the convention of the platform they're developing for. See:
Underscore or camelcase?
Naming conventions: camelCase versus underscore_case?
However, PHP doesn't seem to strictly follow any convention…

Stas Bichenko
- 3,689
- 4
- 24
- 32
11
votes
3 answers
camelCase, PascalCase, or underscore if you start from scratch with reactjs?
Title says it all. Can't seem to find what is most common out in the world.
I'm brand new to programming.
If the answer is "it depends", I would love to know what it depends on. Here to learn.

Will
- 123
- 1
- 1
- 4
3
votes
1 answer
Bothered by an unknown letter case name
This side question bothers me: Has_This_Case_A_Name?
Here is what I could find, but This_Case_Is_Missing:
+---------------------------------------+---------------+
| Names | Example …

sp00m
- 640
- 4
- 11
1
vote
2 answers
What's the reason of choosing PascalCasing over camelCasing or vice versa from a programming language design POV?
I like both but I notice languages that use camelCasing for members sometimes need more adjustments when you want to edit your code. For example (in Python):
node.customData()
vs
node.setCustomData()
custom changes casing. It could be avoided if…

Joan Venge
- 1,950
- 2
- 18
- 24
0
votes
1 answer
Why did JUnit declare setUp and tearDown in camelcase, even though each of them is a single word?
Reference:
http://junit.sourceforge.net/junit3.8.1/javadoc/junit/framework/TestCase.html#setUp()
setUp should have ideally be named as setup
I've explored if any duplicate method setup is used in its parent hierarchy, because of which they renamed…

kai
- 245
- 1
- 7
-2
votes
1 answer
When does it make sense to CamelCase short names?
Given that one needs to deal with case sensitive environment, when would one benefit from having all caps or all non-caps names of variables or similar identifiers, as opposed to have camel case? Limit being number of characters being enforced - max…

Hinko Kocevar
- 15
- 1