naming-convention-guides icon indicating copy to clipboard operation
naming-convention-guides copied to clipboard

`DvdPlayer` or `DVDPlayer`? `HttpUrlParser` or `HTTPURLParser`?

Open tif-calin opened this issue 2 years ago • 0 comments
trafficstars

The given examples for naming conventions conveniently avoid the hottest debates. In fact, very few style guides I've found even address this question


Relevant style guides

style guide link
AirBnB, JavaScript Style Guide https://github.com/airbnb/javascript#naming-conventions
Google, Java Style Guide https://google.github.io/styleguide/javaguide.html#s5.3-camel-case
Microsoft, General Naming Conventions https://learn.microsoft.com/en-us/dotnet/standard/design-guidelines/general-naming-conventions
kettanaito/naming-cheatsheet https://github.com/kettanaito/naming-cheatsheet

Other variables to consider

  • "Shoot Laser Beam" (once upon a time "laser" was an acronym and it's now become a word)
  • "GUI Generator" (gui might be considered sorta "in-between". I think it's slowly transitioning to a word)
  • "ID Parser" (ID isn't an acronym but an abbreviation)
  • "System.IO" (two-letter acronyms like "IO" are particularly contested and Microsoft even has specific rules for them)
  • XMLHttpRequest (an actual web standard name, smh. What's to be done when you have two acronyms right next to each other?)

tif-calin avatar Feb 24 '23 01:02 tif-calin