Camel case and Pascal case mistake

Naming Conventions

Naming Conventions Problem Overview


I constantly forget which is Camel case and which is Pascal case. So I thought that maybe a little history will help. Where do the names of these conventions come from? Is there some history behind their names?

Naming Conventions Solutions


Solution 1 - Naming Conventions

To remember camel case you have to think about the shape of the capital letters. They are like the humps of a camel as you can see in this image.

Pascal Casing - capitalizes each word:

ThisShouldBePascalCase

Camel Casing - is similiar to pascal case but the first word is not capitalized:

thisShouldBeCamelCase

You can read some history here

UPDATE: Change the camel case image after reading the comments.

Solution 2 - Naming Conventions

Pascal is a persons name... a persons name always starts capitalized, whereas 'camel' is just a noun and thus, unless the start of a sentence, is always lowercased.

Solution 3 - Naming Conventions

camel case - first letter of first word lower case, and first letter of every word, after that should be Upper Case.

Examples:

  • camelCase
  • camelCaseLetter

pascal case - first letter of every word should be upper case.

Examples:

  • PascalCase
  • PascalCaseLetter

Solution 4 - Naming Conventions

Pascal Case: in Pascal case every word of each letter should be capital like MossawarHussain

Camel case: As the name show it follow the camel structure of word like mossawarHussain

Difference:

Pascal is a subset of Camel case. The first letter of Pascal is capital and first letter of the camel is small that is the major difference between these two cases.

Solution 5 - Naming Conventions

In camel case first letter of first word lower case, and first letter of every word, after that should be Upper Case.

Ex: userName userFullName

In pascal case first letter of every word should be upper case.

Ex: UserName UserFullName

Solution 6 - Naming Conventions

I could be wrong. PEP 8, for those writing in python, suggests otherwise.
i.e. in python => CamelCase https://www.python.org/dev/peps/pep-0008/

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionjohnyView Question on Stackoverflow
Solution 1 - Naming ConventionsEma.jarView Answer on Stackoverflow
Solution 2 - Naming ConventionsYoeri Van NieuwerburgView Answer on Stackoverflow
Solution 3 - Naming ConventionsKelumView Answer on Stackoverflow
Solution 4 - Naming ConventionsSyed Mossawar Hussain ShahView Answer on Stackoverflow
Solution 5 - Naming ConventionsShakti SrivastavView Answer on Stackoverflow
Solution 6 - Naming ConventionsTommy GibbonsView Answer on Stackoverflow