• Martin Thoma
  • Home
  • Categories
  • Tags
  • Archives
  • Support me

Naming Styles

Contents

  • The Styles
  • Application
  • See also

Naming styles are one of the trivial things in a style guide. Here are some of then names you might hear.

The Styles

  • snake_case
  • camelCase: Also lowerCamelCase
  • PascalCase: Also UpperCamelCase
  • CONSTANT_CASE: This is used in many languages for constants
  • cebab-case: I have only seen this within strings. This is likely as the - is usually used for substraction. It's also used for file names. It's mentioned here and on robinwieruch.de.

Application

Variables Functions / Methods Classes
Python snake_case snake_case PascalCase
JavaScript camelCase camelCase PascalCase
C++ snake_case PascalCase PascalCase
Java camelCase camelCase PascalCase

See also

Wikipedia:

  • Snake case
  • Camel case

Style Guide:

  • C++
  • Java
  • JavaScript
  • Python

Published

Mai 14, 2020
by Martin Thoma

Category

Code

Tags

  • Code 10
  • Style Guide 2

Contact

  • Martin Thoma - A blog about Code, the Web and Cyberculture
  • E-mail subscription
  • RSS-Feed
  • Privacy/Datenschutzerklärung
  • Impressum
  • Powered by Pelican. Theme: Elegant by Talha Mansoor