What is the difference between PascalCase and camelCase?
25
0

What is the difference between PascalCase and camelCase?

PascalCase became popular with Jöns Jacob Berzelius (1779 - 1848) in proposing a standardized way of writing chemical formulas¹.

Daniel Silva09/08/2021
2 min
25
0

What is the PascalCase?

PascalCase became popular with Jöns Jacob Berzelius (1779 - 1848) in proposing a standardized way of writing chemical formulas¹.

Jöns Jacob Berzelius (1779 - 1848)
Jöns Jacob Berzelius (1779 - 1848)

In this notation the Sodium Chloride, as proposed is:

NaCla

In PascalCase the first letter of each word is capitalized. This nomenclature remains practically unchanged until today.


Ok, but wait a minute... Why is this called PascalCase if Jöns Jacob Berzelius was responsible for creating this notation?

This name became more widespread in the 70s and 80s due to its use in several programming languages, including Pascal. Which was named after the great mathematician and scientist Blaise Pascal (1623 - 1662).

Blaise Pascal (1623 - 1662)
Blaise Pascal (1623 - 1662)

What about the camelCase?

The camelCase came about due to the shape similar to the humps of camels.

Email image

We can use CamelCase by putting the first letter of the first word, uppercase or lowercase, having two variations:

  • UpperCamelCase
  • lowerCamelCase

Current pattern

Currently, PascalCase replaced UpperCamelCase therefore we have these two classifications:

  • camelCase: first letter of the first word is lowercase - Naming functions, states...
  • PascalCase: first letter of all words are capitalized - Naming components, screens...

Patterns are essencial so you can keep your projects organized. In a big team it is crucial so you don't waste time discovering what is the purpose of some piece of code... Using name conventions can help you to decifre just looking at its name.


Hope you all liked it. Stay tuned to receive more content about the React world.

Share this Content
Follow my Channel

Bibliography

  1.  Berzelius, Jacob (1813), Thomson, Thomas (ed.), "Essay on the Cause of Chemical Proportions, and on some Circumstances relating to them: together with a short and easy Method of expressing them"Annals of Philosophy, London: Robert Baldwin, II & III, pp. 51–62, 93–106, 244–256, 353–364, 443–454, retrieved 13 December 2014 also Vol III.
Support
More Options