What are the different kinds of cases?

Austin Cory Bart picture Austin Cory Bart · Jun 26, 2013 · Viewed 27.6k times · Source

I'm interested in the different kinds of identifier cases, and what people call them. Do you know of any additions to this list, or other alternative names?

  • myIdentifier : Camel case (e.g. in java variable names)
  • MyIdentifier : Capital camel case (e.g. in java class names)
  • my_identifier : Snake case (e.g. in python variable names)
  • my-identifier : Kebab case (e.g. in racket names)
  • myidentifier : Flat case (e.g. in java package names)
  • MY_IDENTIFIER : Upper case (e.g. in C constant names)

Answer

Shadi Namrouti picture Shadi Namrouti · Jan 23, 2019
  • flatcase
  • kebab-case. Also called caterpillar-case, dash-case, hyphen-case, lisp-case, spinal-case and css-case
  • camelCase
  • PascalCase or CapitalCamelCase
  • snake_case or c_case
  • MACRO_CASE or UPPER_CASE
  • COBOL-CASE or TRAIN-CASE