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

Generalize principle about avoiding abbreviations? #276

Open
LeaVerou opened this issue Jan 28, 2021 · 6 comments
Open

Generalize principle about avoiding abbreviations? #276

LeaVerou opened this issue Jan 28, 2021 · 6 comments
Assignees

Comments

@LeaVerou
Copy link
Member

LeaVerou commented Jan 28, 2021

There is currently no rule against abbreviations in the "naming" section, but there is this sentence in the 3.4. Naming of CSS properties and values section (should this be moved to the naming section?):

Abbreviations are generally avoided.

This seems more broadly applicable, but I'm not sure of the extent. For example, HTML: In the past, we'd heavily abbreviate names of HTML elements (e.g. <img>, <ul>, <h1> etc), whereas recently this is less common (e.g. <video>, <source> (not <src>), <header>, <datalist> etc).
In JS, there are several abbreviations, some common, some less so, e.g. Id, async, Intl, BigInt, RegExp, UInt to name a few.

It might be good to figure out what the rule should be here, i.e. can we define in which cases abbreviations are a good idea and in which cases they are not? It seems this depends on:

@LeaVerou
Copy link
Member Author

LeaVerou commented Jan 31, 2021

This came up here: w3ctag/design-reviews#547 (comment)
Is num acceptable or should be discouraged?

Edit: We suggested droppedEntriesCount instead of numDroppedEntries, we may want to use that as an example in the eventual principle.

@cynthia
Copy link
Member

cynthia commented Feb 9, 2021

Counterexamples that are fine to abbreviate are probably ones that are canonically used in abbreviated form. (like names of common standards, e.g. DOM)

Not sure where rAF fits in though.

@LeaVerou
Copy link
Member Author

LeaVerou commented Feb 9, 2021

@cynthia I was primarily referring to abbreviations that are not acronyms or initialisms. Those are a whole different topic.

@annevk
Copy link
Member

annevk commented Feb 9, 2021

Other considerations:

  1. Is there precedent? (Unless the precedent happens to be awful, it's usually good practice to match it.)
  2. How often are people expected to type this?

@LeaVerou
Copy link
Member Author

LeaVerou commented Feb 9, 2021

Is there precedent? (Unless the precedent happens to be awful, it's usually good practice to match it.)

Ah, this reminded me to file #285 that I've had in my back burner for a while.

@cynthia
Copy link
Member

cynthia commented Feb 9, 2021

abbreviations that are not acronyms or initialisms

Understood. (Abbreviation and acronym are the same word in my native tongue, in my defense.)

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

No branches or pull requests

5 participants