Snake case

Snake case (or snake_case) is the process of writing compound words so that the words are separated with an underscore symbol (_) instead of a space. The first letter is usually changed to lowercase. Some examples of Snake case would be "foo_bar" or "hello_world". It is commonly used in computer code. At least one study found that readers can recognize snake case faster than CamelCase.

Variants

If the first letter of each word is uppercase, this is known as Train-Case.

Programming languages that use snake case

References

  1. ↑ "An Eye Tracking Study on camelCase and under_score Identifier Styles".
  2. ↑ "StackOverflow - What's the name for snake_case with dashes?".
  3. ↑ "Camel_SNAKE-kebab".
  4. ↑ Michael A. Covington; Roberto Bagnara; Richard A. O'Keefe; Jan Wielemaker; Simon Price (2009). Coding Guidelines for Prolog (v.3). p. 14.
  5. ↑ Rao, Navule Pavan Kumar (December 10, 2021). Getting Started with V Programming. p. 29. ASIN B09FKK3JL7. ISBN 978-1839213434. OCLC 1290492862.