Camel Case and Pascal Case Mistake

Camel Case and Pascal Case Mistake

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?

4

6 Answers

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.

3

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.

4

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

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.

2

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

0

I could be wrong. PEP 8, for those writing in python, suggests otherwise.
i.e. in python => CamelCase

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Alexander Ross
Author

Alexander Ross

Alexander Ross has covered the video game industry for a decade, writing deep dives on game design, esports tournaments, VR developments, and gaming culture.