Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PascalCase wrongly named as camelCase #2194

Closed
rakshith-ravi opened this issue Dec 22, 2019 · 6 comments
Closed

PascalCase wrongly named as camelCase #2194

rakshith-ravi opened this issue Dec 22, 2019 · 6 comments

Comments

@rakshith-ravi
Copy link

rakshith-ravi commented Dec 22, 2019

Not really a big deal, but wherever I see, the naming convention is documented as CamelCase, which usually implies lowerCamelCase when in actuality it's UpperCamelCase or, more commonly referred to as, PascalCase. Should I put in a PR to change it to PascalCase?

Edit: References:

@carols10cents
Copy link
Member

The wikipedia article you linked says:

Some programming styles prefer camel case with the first letter capitalised, others not.[1][2][3] For clarity, this article calls the two alternatives upper camel case (initial uppercase letter, also known as Pascal case) and lower camel case (initial lowercase letter, also known as Dromedary case). Some people and organizations, notably Microsoft,[2] use the term camel case only for lower camel case. Pascal case means only upper camel case.

Which says to me that 1. Pascal case is a subset of camel case, so we're not wrong and 2. Only some people distinguish camel and pascal; we're some people that don't. So we're not going to change this. Thanks though!

@brennancheung
Copy link

I made this same assumption and was about to file a bug for it until I saw this. I think PascalCase is less confusing and more specific. I never heard of UpperCamelCase before and always just called it PascalCase. I don't think I'm the only one that will be confused about this. No harm in being more precise and leaving less open to interpretation. Just my 2 cents.

@texascloud
Copy link

I personally do not distinguish between Pascal and camelCase for obvious reasons

@emuvi
Copy link

emuvi commented May 21, 2021

I would argue that this choice feels wrong in terms of computer science history and precision of language in didactic material.

@RandomEngy
Copy link

Why would you choose to use an ambiguous, less specific name when you have a well understood and precise alternative that has no ambiguity? This was a really weird idiosyncrasy in an otherwise excellent handbook.

I understand that you were not technically wrong but it doesn't mean it wouldn't be more helpful with a change.

@rakshith-ravi
Copy link
Author

Gotta agree with David on this one. Being more specific is almost always a good thing when compared to being more general and being technically correct, at the cost of further confusion. The fact that we've had quite a few PRs and issues about this only reinforces the fact that people are indeed getting confused (and that isn't counting the number of people who probably read it and assumed it was a typo, but didn't open an issue / PR)

carols10cents added a commit that referenced this issue Jan 23, 2023
Brings the terminology in line with the rest of the project, see
<rust-lang/rfcs#2389>.

Connects to #2194.
@rust-lang rust-lang locked as resolved and limited conversation to collaborators Jan 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants