mirror of
https://github.com/zebrajr/ladybird.git
synced 2025-12-06 00:19:53 +01:00
Docs: Prefer closely matching explicit spec AO names
This commit is contained in:
parent
0d1ce48071
commit
18a160e0e9
|
|
@ -35,6 +35,22 @@ class Filedescriptor;
|
|||
String MIME_Type();
|
||||
```
|
||||
|
||||
When implementing spec algorithms and other constructs that a spec explicitly names, prefer closely matching the same names the spec uses, whenever possible.
|
||||
|
||||
Given the construct at https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#suffering-from-being-missing which has the literal name _“Suffering from being missing”_ in the spec, for example:
|
||||
|
||||
###### Right:
|
||||
|
||||
```c++
|
||||
bool HTMLInputElement::suffering_from_being_missing(); // exactly matches the spec naming
|
||||
```
|
||||
|
||||
###### Wrong:
|
||||
|
||||
```c++
|
||||
bool HTMLInputElement::has_missing_constraint(); // arbitrarily differs from spec naming
|
||||
```
|
||||
|
||||
Use full words, except in the rare case where an abbreviation would be more canonical and easier to understand.
|
||||
|
||||
###### Right:
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user