What are the differences between some of the popular casing styles in programming?
A quick explanation of popular casing styles.
Happy Sunday! Today's article is very brief. I just wanted to describe the differences between popular casing styles in coding. It's good to know and helps writing/reading code make a little more sense in the native language that recommends it.
- Snake Case
- This style features all words in lowercase but with underscores for space separation.
- Example:
my_cool_variable - Languages whose style guides recommend it for variables: Python, Ruby, Rust
- Camel Case
- This style features all words together (no space) but each word has a capital first letter... except the first word.
- Example:
myCoolVariable - Languages whose style guides recommend it for variables: Java, JavaScript
- Pascal Case
- This style features all words together (no space) but every word (including the first word) has a capital first letter.
- Example:
MyCoolVariable - Languages whose style guides recommend it for variables: C#
Different languages have preferences but may be compatible with other formats. For example, even though Python's style guide (PEP8) strongly recommends snake case, the language will technically still work with camel case and pascal case.
For more information, please check these resources:




