what is snake case

what is snake case

1 year ago 33
Nature

Snake case is a naming convention used in computing, where each space in a phrase is replaced with an underscore character, and words are written in lowercase. It is commonly used for variable and subroutine names in programming languages such as Python, Ruby, C/C++, and Rust. Snake case is also used for naming files, as it keeps names readable. The name "snake case" comes from the associated imagery of underscores that represents snakes that slither on the ground between words. Snake case is similar to kebab case, where hyphens are used instead of underscores, and both conventions can make it easier for a developer to read code because the white space between words reads in the same way as a normal sentence. However, snake case is considered easier to read because the underscores make it clear where one word ends and the next begins. Camel case is another naming convention where there is no white space between compound words, and it can be harder to read because the lack of separators can make it difficult to quickly parse a variable name.

Read Entire Article