Actually, camelCase vs PascalCase

I see many suggesting people use in their for compatibility.

But I think they mean . At least, that's what their examples show.

For the differences between the two see, for example, here:

khalilstemmler.com/blogs/camel

...

Camel Case vs. Snake Case vs. Pascal Case — Naming Conventions | Khalil Stemmler

Naming conventions bring consistency to your codebase which makes it easier to maintain. Camel case, pascal case, and snake case are the three most common naming conventions in modern programming languages.

4 likes Jason Wiley 🏳️‍🌈 Z :verified: dopey (he/him) Hank G ☑️
6 reposts Mr Omneo :verified: robbielink Johan Olofsson Jason B 🧙‍♂️ dopey (he/him) BryanH 🏳️‍🌈

Webmentions:

robbielink

@borghal Not a programmer but cool to know. Guess this falls under #til

til

robbielink

@borghal But now I can't decide which to use. I would normally put TIL, camel case would be tIL, snake won't work here, and when you type a hashtag the little popup that shows how often it is used has all lower case: til. I guess the real question is what do #ScreenReaders want?

screenreaders

Borghal :verified_gay:

@robbielink I'm glad you found it interesting, Robbie!

Borghal :verified_gay:

@robbielink That is the real question! I don't know how screen readers deal with acronyms inside a hashtag. More opportunities to learn today!

Casey Peel

@robbielink @borghal I'm pretty sure the pop-up only shows hashtags in all lowercase (probably normalizes to lowercase since the "follow a hashtag" isn't case sensitive) so I wouldn't use that as a guide.

I wouldn't camel (or Pascal) case an acronym/initialism and rely on the screen reader to Do The Right Thing just as it would in other text scenarios like chat messages.

Hank G ☑️

@borghal One thing I’m always curious about is if the searching is case sensitive or not for when results come back from searches.

Martijn Vos

For completeness sake, there's also kebab-case.


Privacy Policy Affiliate Disclosure