Skip to content

Commit

Permalink
Expand on readibility v. brevity.
Browse files Browse the repository at this point in the history
  • Loading branch information
hober committed May 4, 2020
1 parent 2f9ba01 commit d59b3a7
Showing 1 changed file with 25 additions and 6 deletions.
31 changes: 25 additions & 6 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -194,14 +194,33 @@ API naming *must* be done in easily readable US English.
Keep in mind that most web developers are not native English speakers.
Whenever possible, names should be chosen that use common vocabulary
non-native English speakers are likely to understand when first encountering the name.
Always value readability over brevity.

<p class="example"For example `horizontalAlignment` is a more
English-readable name than `alignmentHorizontal`.
<div class="example">

For example `horizontalAlignment` is
a more English-readable name
than `alignmentHorizontal`.

</div>

Value readability over brevity,
though always keep in mind that sometimes
the shorter name is the clearer one.
For instance,
it may be appropriate to use technical language or well-known terms of art
in the specification where the API is defined.

Note: It may be appropriate to use technical language or well-known terms of art
in the specification where the API is defined;
this principle applies only to the API names themselves.
<div class="example">

For example,
the Fetch API's {{Body}} mixin's {{Body/json()}} method
is named for the kind of object it returns.
JSON is a well-known term of art
among web developers likely to use the Fetch API.
It would harm comprehension
to name this API less directly connected to its return type. [[FETCH]]

</div>

<h4 id="naming-charset" class="no-num no-toc">Use ASCII names</h4>

Expand Down

0 comments on commit d59b3a7

Please sign in to comment.