File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff 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
22012201Use strings as the values for constants or sets of enumerated values.
2202+ See [[#naming-is-hard]] when choosing strings.
22022203
22032204Strings make it easier for developers to inspect values
22042205and read code that uses those values.
@@ -3825,7 +3826,7 @@ Names take meaning from:
38253826API naming *must* be done in easily readable US English.
38263827Keep in mind that most web developers aren't native English speakers.
38273828Whenever 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
38383839Value 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.
38393843Keep in mind, however, that
38403844the shorter name is often the clearer one.
38413845For instance,
You can’t perform that action at this time.
0 commit comments