+ 28
What is Pascal Case, Camel Case and Snake Case?
What is Pascal Case ,Camel Case and Snake Case? Where can I Use it?
13 Respostas
+ 19
Paul OMG... These should become the official definitions for casing styles in coding conventions.
He said, "because dinos are cool, especially dinos with spikes on their bodies." 🤣😂
+ 15
These are all methods for naming variables.
Say I wanted to make a variable for my date of birth.
In Pascal Case the name of the variable would be "DateOfBirth" (all words in the name have their first letter capitalized)
In Camel Case the name of the variable would be "dateOfBirth" (all words in the name have their first letter capitalized expect the first one)
In Snake Case the name of the variable would be "date_of_birth" (the words in the name all contain only lowercase letters and the words are connect by an underscore)
Generally Pascal Case is used for naming classes (and some people use them to name constants as well)
Camel Case and Snake Case are generally used for the same things so you can just pick whichever one you prefer. They are used for naming variables, properties, functions/methods, etc. (really everything that Pascal Case isn't used for)
+ 9
Its seems like we forget to mention two more naming conventions. First comes from Microsoft WinAPI, where prefix __ is added like so __foo. Another one which is used in Android SDK (AOSP) where 'm' used for non public fields and 's' for static fields.
+ 9
Lev Tolstoy SPB I typically consider prefixes used in naming conventions to be specific to a framework, a language, a platform, a standard, a particular organization / group, and so on and so forth.
This discussion seems to be focused on the different types of casing styles used in any given naming convention.
For that reason, I'm assuming other naming conventions, like prefixes, were not considered based on context.
+ 8
These are naming conventions for variable names.
Remember these are convention not rule. The difference between a rule and a convention is that if you don't follow a rule, your program will cause an error and if you don't follow convention, your program would still run but a convention should be followed to maintain the standard of coding.
CamelCase
Snake_case
+ 7
David Carroll, You right for sure. But maybe somebody will find it interesting too.
+ 5
hssss_hssss 😂😂
+ 5
Personally, I like dromedaries for variables, camels for functions... and kebabs for dinner. lol
+ 1
@chillPill LOL🤣🤣🤣🤣
( I just switched to Gboard for ROFLs)
Made my day…