Computer programming case styles

By xngo on August 25, 2019

In computer programming languages, different case styles are used in method, function, variable names or classes.

Camel case

There are 2 type of camel cases: upper camel case and lower camel case.

  • For the upper camel case, the first letter of each word is capitalized. For example, DoSomethingAwesome.
  • For the lower camel case, only the first letter of the first word is lowercase. The first letter of the other words are capitalized. For example, DoSomethingAwesome.

Snake case

Each word is separated by an underscore. For example, do_something_awesome or DO_SOMETHING_AWESOME.

Kebab case

Each word is separated by a hyphen. For example, do-something-awesome or DO-SOMETHING-AWESOME.

About the author

Xuan Ngo is the founder of OpenWritings.net. He currently lives in Montreal, Canada. He loves to write about programming and open source subjects.