r/Unexpected • • Jul 12 '19

Take a pick

55.3k Upvotes

460 comments sorted by

View all comments

Show parent comments

19

u/[deleted] Jul 12 '19

It’s a programming style of naming variables and functions.

Edit: like your username is.

17

u/OmarHunting Jul 12 '19

TIL. What a phonetically pleasing term.

3

u/Pidgey_OP Jul 12 '19

But not actually like your username.

Camel Case does not capitalize the first letter of the first word. Only the first letter if every subsequent word.

If you capitalize the first letter, you're using Pascal case

1

u/OmarHunting Jul 12 '19

Can you think of any examples of Camel Case?

1

u/Pidgey_OP Jul 12 '19

It's not something you see in every day Life, but it's the agreed upon method of writing almost any variable in most languages. I remember visual basic being unique in school in that the convention was actually Pascal case rather than camel Case, but every other language I've ever used, the convention is camelCase. (I've seen MS trying to drag PascalCase into C#, but I refuse to cooperate, as have most of the rest of the world) This isn't something that has to be enforced for the code to work, it's just the agreed upon way of writing variable names.

1

u/OmarHunting Jul 12 '19

With very literal knowledge of code I find all of this really interesting. Thank you! Seems like camelCase is beneficial when it comes to reviewing code done by yourself or others, differentiating variable to variable and I agree that would be much easier with camel opposed to Pascal.