Skip to content

Commit b4e7086

Browse files
Use names that describe purpose (#550)
I found that I needed to redo the whole section here. Changing the focus seemed better than adding text. This is more text, but not a lot more. Future-proofing is one motivation, but it's not the real motivation for these recommendations. I also found the key event example to be spectacularly non-compelling. It even made me think that it is almost a bad example. Key events can be synthesized by speech recognition tools in some cases. To that end, I chose an example that I'm more familiar with. Closes #507.
1 parent 2dfb2b8 commit b4e7086

File tree

1 file changed

+17
-10
lines changed

1 file changed

+17
-10
lines changed

index.bs

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3728,13 +3728,22 @@ such as an author or user,
37283728
use the generic pronoun "they", "their", etc.
37293729
For example, "A user may wish to adjust their preferences".
37303730

3731-
<h3 id="naming-future-proofing">Use future-proof names</h3>
3731+
<h3 id="naming-future-proofing">Use names that describe a purpose</h3>
37323732

3733-
Naming should be generic and future-proof whenever possible.
3733+
Name things for what they do, not how they do it.
37343734

3735-
The name should not be directly associated with a brand or specific revision of
3736-
the underlying technology whenever possible; technology becomes obsolete, and
3737-
removing APIs from the web is difficult.
3735+
Names that reflect the purpose of their subject
3736+
are more likely to be future-proof.
3737+
[[#removing-features|Removing APIs from the web is difficult]],
3738+
so names need to outlast details.
3739+
3740+
In particular,
3741+
names should avoid the use of
3742+
code names,
3743+
branding,
3744+
or details of the technology used to implement capabilities.
3745+
These can become obsolete
3746+
and might need to be replaced in the future.
37383747

37393748
<div class="example">
37403749

@@ -3747,11 +3756,9 @@ Instead, general terms that describe what the API does were chosen. [[REMOTE-PLA
37473756

37483757
<div class="example">
37493758

3750-
The `keydown` and `keyup` {{KeyboardEvent}}s were not named
3751-
for the specific hardware bus that keyboards used at the time.
3752-
Instead, generic names were chosen
3753-
that are as applicable to today's Bluetooth and USB keyboards
3754-
as they were to PS/2 and ADB keyboards back then. [[UIEVENTS]]
3759+
The WebTransport API enables the networking capabilities provided by the QUIC protocol.
3760+
However, the name reflects the more general purpose of transporting data.
3761+
[[WebTransport]][[RFC9000]]
37553762

37563763
</div>
37573764

0 commit comments

Comments
 (0)