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

Incorrect naming for Camel & LowerCamel #38

Open
ghostsquad opened this issue Mar 31, 2022 · 9 comments
Open

Incorrect naming for Camel & LowerCamel #38

ghostsquad opened this issue Mar 31, 2022 · 9 comments

Comments

@ghostsquad
Copy link

https://khalilstemmler.com/blogs/camel-case-snake-case-pascal-case/

Current CamelCase used in this library is actually supposed to be PascalCase
Current LowerCamelCase is should just be CamelCase

@hyacinthus
Copy link

I also made a bug once because of this issue.

@hyacinthus
Copy link

But it's too late to change the name for forward compatibility, so maybe highlight it in the comments file to emphasize it.

@tliron
Copy link

tliron commented Jun 25, 2022

Also "LowerCamelCase" is often called "DromedaryCase", which has the advantage of being ten times cuter.

@ghostsquad
Copy link
Author

ghostsquad commented Jun 26, 2022

@tliron not really sure I agree that camelCase is "often" called "dromedaryCase".

https://trends.google.com/trends/explore?date=today%205-y&geo=US&q=PascalCase,DromedaryCase,CamelCase

image

image

However, happy to learn another term!

@hlindberg
Copy link

See nothing wrong with current naming, and change would break compatibility. Suggest closing this ticket (to save the next person some time when looking through the backlog).

@bobjackman
Copy link

bobjackman commented Jun 25, 2024

It's true that changing it now would break backward compatibility (hence the suggestion to add a comment to the docs about it), but the claim that "nothing wrong with current naming" is a stretch -- while not technically wrong, the therm "lowerCamelCase" is so infinitesimally obscure it may as well be (Personally, this is the first time I've seen it in my entire 22 year career). PascalCase and camelCase are far and wide the industry accepted and widely used terms for this.

@tliron
Copy link

tliron commented Jun 25, 2024

How about introducing aliases for various naming traditions? It would not break backwards compatibility.

@bobjackman
Copy link

Could do, but would have to use yet different terms since ToCamelCase() is already in use. (aliasing ToCamelCase() -> ToLowerCamelCase() would break current usages of ToCamelCase())

@seiyab
Copy link

seiyab commented Sep 21, 2024

How about adding ToPascalCase() and just deprecate ToCamelCase()? Doesn't recommending more explicit terms, ToPascalCase() and ToLowerCamelCase() make sense?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants