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.[1]
Variants
If the first letter of each word is uppercase, this is known as Train-Case.[2][3]
Programming languages that use snake case
Snake Case Media
Piece of code from a module of the Linux kernel, which uses snake case for identifiers
Related pages
References
- ↑ An Eye Tracking Study on camelCase and under_score Identifier Styles.
- ↑ StackOverflow - What's the name for snake_case with dashes?.
- ↑ Camel_SNAKE-kebab.
- ↑ Michael A. Covington. Coding Guidelines for Prolog (v.3) (2009). p. 14.
- ↑ Rao, Navule Pavan Kumar. Getting Started with V Programming (in en) (December 10, 2021). p. 29. ISBN 978-1839213434. OCLC 1290492862.