Camel case and snake case: Difference between revisions

Content added Content deleted
mNo edit summary
m (typo)
Line 4: Line 4:
'''Camel Case'''.
'''Camel Case'''.


'''Snake case''' variables are generally all lower case, with an underscore between words in the variable, as in '''snake_case_variable''''. '''Camel case''' variables are generally lower case first (except in some Pascal conventions or with class names in many other languages), with an underscore between words in the variable, as in ''''snakeCaseVariable''''.
'''Snake case''' variables are generally all lower case, with an underscore between words in the variable, as in '''snake_case_variable''''. '''Camel case''' variables are generally lower case first (except in some Pascal conventions or with class names in many other languages), with captalization of the initial letter of the words within the variable, as in ''''snakeCaseVariable''''.


Leading underscores are not used in such variables except as part of a different naming convention, usually for special internal or system variables. White space is not permitted as part of camel case or snake case variable names.
Leading underscores are not used in such variables except as part of a different naming convention, usually for special internal or system variables. White space is not permitted as part of camel case or snake case variable names.