Skip to content

Commit 9fc15ba

Browse files
Avoid abbreviations generally (#600)
1 parent 444a329 commit 9fc15ba

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

index.bs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2199,6 +2199,7 @@ is a request, rather than a guarantee.
21992199
<h3 id="string-constants">Use strings for constants and enums</h3>
22002200

22012201
Use strings as the values for constants or sets of enumerated values.
2202+
See [[#naming-is-hard]] when choosing strings.
22022203

22032204
Strings make it easier for developers to inspect values
22042205
and read code that uses those values.
@@ -3825,7 +3826,7 @@ Names take meaning from:
38253826
API naming *must* be done in easily readable US English.
38263827
Keep in mind that most web developers aren't native English speakers.
38273828
Whenever possible, names should be chosen that use common vocabulary
3828-
a majority of English speakers are likely to understand when first encountering the name.
3829+
a majority of English speakers are likely to understand when first encountering the name.
38293830

38303831
<div class="example">
38313832

@@ -3836,6 +3837,9 @@ than `cardinality`.
38363837
</div>
38373838

38383839
Value readability over brevity.
3840+
Avoid abbreviations,
3841+
except in cases where an abbreviation is extremely common and easy to understand.
3842+
For example `UIEvent`, where "`UI`" stands for user interface.
38393843
Keep in mind, however, that
38403844
the shorter name is often the clearer one.
38413845
For instance,

0 commit comments

Comments
 (0)